diff --git a/.circleci/config.yml b/.circleci/config.yml index d10bbf02aa45..82ec00875fda 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2 .tags: &tags # tags need to be explicitely defined (whitelist) - tags: {only: "/.*/"} + tags: { only: "/.*/" } .only-tags: &only-tags <<: *tags @@ -11,7 +11,8 @@ version: 2 branches: { only: master } <<: *tags -.no-master: &no-master # contrary to tags, the branches must be excluded (blacklist) +.no-master: + &no-master # contrary to tags, the branches must be excluded (blacklist) branches: { ignore: master } workflows: @@ -20,34 +21,33 @@ workflows: jobs: # publish jobs depend on this as well, # thus tags need to be allowed for these - - test: {filters: {<<: *tags}} + - test: { filters: { <<: *tags } } - build/promtail-windows: - requires: [ test ] + requires: [test] - build/docker-driver: - requires: [ test ] - filters: {<<: *no-master} + requires: [test] + filters: { <<: *no-master } - publish/docker-driver: - requires: [ test ] + requires: [test] filters: { <<: *tag-or-master } - publish/binaries: - requires: [ test ] + requires: [test] filters: { <<: *only-tags } - test-helm: - requires: [ test ] - filters: {<<: *tags} + requires: [test] + filters: { <<: *tags } - publish-helm: - requires: [ test-helm ] - filters: {<<: *tag-or-master} - + requires: [test-helm] + filters: { <<: *tag-or-master } # https://circleci.com/blog/circleci-hacks-reuse-yaml-in-your-circleci-config-with-yaml/ .defaults: &defaults docker: - - image: grafana/loki-build-image:0.9.1 + - image: grafana/loki-build-image:0.9.2 working_directory: /src/loki jobs: @@ -146,4 +146,10 @@ jobs: fingerprints: - "5a:d3:08:5e:f7:53:a0:c4:e9:5d:83:c6:02:6a:d9:bd" - checkout - - run: make helm-publish + - run: + name: import GPG key + command: echo -e "$GPG_KEY" | gpg --import + - run: + name: export GPG key + command: gpg --export-secret-key loki-team@googlegroups.com > ~/.gnupg/secring.gpg + - run: PACKAGE_ARGS='--sign --key "Grafana Loki" --keyring ~/.gnupg/secring.gpg' make helm-publish diff --git a/.drone/drone.yml b/.drone/drone.yml index 2e575e203a20..e46fe5eb008e 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -12,28 +12,28 @@ workspace: steps: - name: test - image: grafana/loki-build-image:0.9.1 + image: grafana/loki-build-image:0.9.2 commands: - make BUILD_IN_CONTAINER=false test depends_on: - clone - name: lint - image: grafana/loki-build-image:0.9.1 + image: grafana/loki-build-image:0.9.2 commands: - make BUILD_IN_CONTAINER=false lint depends_on: - clone - name: check-generated-files - image: grafana/loki-build-image:0.9.1 + image: grafana/loki-build-image:0.9.2 commands: - make BUILD_IN_CONTAINER=false check-generated-files depends_on: - clone - name: check-mod - image: grafana/loki-build-image:0.9.1 + image: grafana/loki-build-image:0.9.2 commands: - make BUILD_IN_CONTAINER=false check-mod depends_on: @@ -561,7 +561,7 @@ platform: steps: - name: trigger - image: grafana/loki-build-image:0.9.1 + image: grafana/loki-build-image:0.9.2 commands: - ./tools/deploy.sh environment: @@ -588,7 +588,7 @@ platform: steps: - name: trigger - image: grafana/loki-build-image:0.9.1 + image: grafana/loki-build-image:0.9.2 commands: - go run ./tools/delete_tags.go -max-age=2160h -repo grafana/loki -delete - go run ./tools/delete_tags.go -max-age=2160h -repo grafana/promtail -delete diff --git a/Makefile b/Makefile index a602a387ba45..e40df874006b 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ IMAGE_NAMES := $(foreach dir,$(DOCKER_IMAGE_DIRS),$(patsubst %,$(IMAGE_PREFIX)%, # make BUILD_IN_CONTAINER=false target # or you can override this with an environment variable BUILD_IN_CONTAINER ?= true -BUILD_IMAGE_VERSION := 0.9.1 +BUILD_IMAGE_VERSION := 0.9.2 # Docker image info IMAGE_PREFIX ?= grafana @@ -319,6 +319,7 @@ endif CHARTS := production/helm/loki production/helm/promtail production/helm/fluent-bit production/helm/loki-stack +helm: PACKAGE_ARGS ?= helm: -rm -f production/helm/*/requirements.lock @set -e; \ @@ -326,7 +327,7 @@ helm: for chart in $(CHARTS); do \ helm dependency build $$chart; \ helm lint $$chart; \ - helm package $$chart; \ + helm package $(PACKAGE_ARGS) $$chart; \ done rm -f production/helm/*/requirements.lock @@ -349,7 +350,7 @@ helm-publish: helm git config user.name "${CIRCLE_USERNAME}" git checkout gh-pages || (git checkout --orphan gh-pages && git rm -rf . > /dev/null) mkdir -p charts - mv *.tgz index.md charts/ + mv *.tgz *.tgz.prov index.md charts/ helm repo index charts/ git add charts/ git commit -m "[skip ci] Publishing helm charts: ${CIRCLE_SHA1}" diff --git a/loki-build-image/Dockerfile b/loki-build-image/Dockerfile index 1bc496669f8d..aeca9cbc21ac 100644 --- a/loki-build-image/Dockerfile +++ b/loki-build-image/Dockerfile @@ -23,10 +23,10 @@ RUN GO111MODULE=on go get github.com/drone/drone-cli/drone@1fad337d74ca0ecf42099 FROM golang:1.13.4-stretch RUN apt-get update && \ apt-get install -qy \ - musl \ - file zip unzip jq gettext\ - protobuf-compiler libprotobuf-dev \ - libsystemd-dev && \ + musl gnupg \ + file zip unzip jq gettext\ + protobuf-compiler libprotobuf-dev \ + libsystemd-dev && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* COPY --from=docker /usr/bin/docker /usr/bin/docker @@ -43,7 +43,7 @@ RUN GO111MODULE=on go get \ github.com/golang/protobuf/protoc-gen-go@v1.3.0 \ github.com/gogo/protobuf/protoc-gen-gogoslick@v1.2.1 \ github.com/gogo/protobuf/gogoproto@v1.2.1 \ - github.com/go-delve/delve/cmd/dlv \ + github.com/go-delve/delve/cmd/dlv@v1.3.2 \ # Due to the lack of a proper release tag, we use the commit hash of # https://github.com/golang/tools/releases v0.1.7 golang.org/x/tools/cmd/goyacc@58d531046acdc757f177387bc1725bfa79895d69 \ diff --git a/production/helm/public.pgp b/production/helm/public.pgp new file mode 100644 index 000000000000..f3d730f09723 --- /dev/null +++ b/production/helm/public.pgp @@ -0,0 +1,31 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQENBF5/50EBCAC3Pab5BojOdLJT+6aJmfWF3HbVbI4l/TOIxMdvI8jneCA+wBX7 +Pp3x4LoSUWX968f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