-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from innogames/mat_view
Fix optimization for materialized views
- Loading branch information
Showing
11 changed files
with
211 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
|
||
tests: | ||
name: Test code | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: | ||
- ^1.13 | ||
- ^1.14 | ||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: make test | ||
|
||
- name: Build and run version | ||
run: | | ||
make VERSION=testing-version | ||
./graphite-ch-optimizer --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Upload Packages to new release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: innogames/graphite-ch-optimizer:builder | ||
|
||
outputs: | ||
deb: ${{ steps.build.outputs.deb }} | ||
rpm: ${{ steps.build.outputs.rpm }} | ||
sha256sum: ${{ steps.build.outputs.sha256sum }} | ||
md5sum: ${{ steps.build.outputs.md5sum }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout | ||
with: | ||
# Otherwise there's a risk to not get latest tag | ||
# We hope, that the current commit at | ||
# least 50 commits close to the latest release | ||
fetch-depth: 50 | ||
- name: Build packages | ||
id: build | ||
run: | | ||
# Checkout action doesn't fetch tags | ||
git fetch --tags | ||
make -e CGO_ENABLED=0 packages | ||
make github_artifact | ||
- name: Upload rpm | ||
id: upload-rpm | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ASSET: ${{ steps.build.outputs.rpm }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: artifact/${{ env.ASSET }} | ||
asset_name: ${{ env.ASSET }} | ||
asset_content_type: application/octet-stream | ||
- name: Upload sha256sum | ||
id: upload-sha256sum | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ASSET: ${{ steps.build.outputs.sha256sum }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: artifact/${{ env.ASSET }} | ||
asset_name: ${{ env.ASSET }} | ||
asset_content_type: application/octet-stream | ||
- name: Upload md5sum | ||
id: upload-md5sum | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ASSET: ${{ steps.build.outputs.md5sum }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: artifact/${{ env.ASSET }} | ||
asset_name: ${{ env.ASSET }} | ||
asset_content_type: application/octet-stream | ||
- name: Upload deb | ||
id: upload-deb | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ASSET: ${{ steps.build.outputs.deb }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: artifact/${{ env.ASSET }} | ||
asset_name: ${{ env.ASSET }} | ||
asset_content_type: application/octet-stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
graphite-ch-optimizer | ||
build/ | ||
artifact/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# | ||
# Image for building packages in docker | ||
# innogames/graphite-ch-optimizer:builder on docker-hub | ||
# | ||
FROM golang:1.13-alpine as builder | ||
|
||
RUN apk --no-cache add ruby ruby-dev ruby-etc make gcc g++ rpm git tar && \ | ||
gem install --no-user-install --no-document fpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Docker images and tags | ||
The images `innogames/graphite-ch-optimizer` are available on docker-hub with the following tags: | ||
|
||
- `${semantic_version}` (`docker/graphite-ch-optimizer/Dockerfile`) - these tags are automatically built from tags with tag regexp `v([.0-9]+)` | ||
- `latest` (`docker/graphite-ch-optimizer/Dockerfile`) - is built automatically from the latest `master` commit | ||
- `builder` (`docker/builder/Dockerfile`) - is built automatically from the latest `master` commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# CREATE NEW RELEASE | ||
When the code is ready to new release, create it with the tag `v${major_version}.${minor_version}.${patch_version}`. | ||
We have a [workflow](../.github/workflows/upload-assets.yml), which will upload created DEB and RPM packages together with hash sums as the release assets. | ||
|
||
## Use Jenkins to upload packages to deb-drop repository | ||
When the release is ready and assets are uploaded, launch the multibranch pipeline job configured against [Jenkinsfile](../Jenkinsfile) with desired version. It will download the package, compare hashsums and upload it to the repository. |
Oops, something went wrong.