From aee1438ff2f7a8df8d7f2b825f2af9c9edbaa8ed Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Fri, 15 May 2020 16:30:30 +0200 Subject: [PATCH] CircleCI: Enable internal v7.0.0 release (#24733) * CircleCI: Sync with master branch Signed-off-by: Arve Knudsen * CirclecI: Temporarily modify release pipeline to only publish internally Signed-off-by: Arve Knudsen --- .circleci/config.yml | 110 ++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 59 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bad4d5d65c2..fb74116c8a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,9 @@ aliases: tags: ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ branches: - ignore: master + ignore: + - master + - chore/test-release-pipeline - &filter-only-master branches: only: master @@ -54,7 +56,7 @@ commands: - run: name: "Install Grafana build pipeline tool" command: | - VERSION=0.4.7 + VERSION=0.4.8 curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${VERSION}/grabpl chmod +x grabpl mv grabpl /tmp @@ -91,7 +93,7 @@ jobs: elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then # We're testing the release pipeline /tmp/grabpl build-backend --edition << parameters.edition >> \ - --variants << parameters.variant >> v6.7.0-beta1 + --variants << parameters.variant >> v7.0.0-test else # A master or PR build /tmp/grabpl build-backend --edition << parameters.edition >> \ @@ -405,7 +407,7 @@ jobs: /tmp/grabpl package --jobs 2 --edition oss --sign $CIRCLE_TAG elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then # We're testing the release pipeline - /tmp/grabpl package --jobs 2 --edition oss --sign v6.7.0-beta1 + /tmp/grabpl package --jobs 2 --edition oss --sign v7.0.0-test elif [[ $CIRCLE_BRANCH == "master" ]]; then # A master build /tmp/grabpl package --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID @@ -467,7 +469,7 @@ jobs: /tmp/grabpl package --jobs 2 --edition enterprise --sign $CIRCLE_TAG elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then # We're testing the release pipeline - /tmp/grabpl package --jobs 2 --edition enterprise --sign v6.7.0-beta1 + /tmp/grabpl package --jobs 2 --edition enterprise --sign v7.0.0-test elif [[ $CIRCLE_BRANCH == "master" ]]; then # A master build /tmp/grabpl package --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID @@ -529,7 +531,10 @@ jobs: --deb-db-bucket grafana-testing-aptly-db --deb-repo-bucket grafana-testing-repo --packages-bucket \ grafana-downloads-test --rpm-repo-bucket grafana-testing-repo --simulate-release else - /tmp/grabpl publish-packages --edition << parameters.edition >> + # TODO: Revert to non-simulation + /tmp/grabpl publish-packages --edition << parameters.edition >> \ + --deb-db-bucket grafana-testing-aptly-db --deb-repo-bucket grafana-testing-repo --packages-bucket \ + grafana-downloads-test --rpm-repo-bucket grafana-testing-repo --simulate-release fi - run: name: CI job failed @@ -610,6 +615,14 @@ jobs: # This version is necessary for building cross-platform images version: 18.09.3 - install-grabpl + - run: + name: Install gcloud SDK + command: | + echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | \ + sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list + curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \ + sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - + sudo apt-get update && sudo apt-get install google-cloud-sdk # XXX: Is this necessary? - run: docker run --privileged linuxkit/binfmt:v0.6 - run: @@ -643,7 +656,9 @@ jobs: /tmp/grabpl publish-docker --jobs 4 --edition << parameters.edition >> --ubuntu=<< parameters.ubuntu >> --dry-run elif [[ -n $CIRCLE_TAG ]]; then # This is a release - /tmp/grabpl publish-docker --jobs 4 --edition << parameters.edition >> --ubuntu=<< parameters.ubuntu >> + # TODO: Revert to non-internal + /tmp/grabpl publish-docker --jobs 4 --edition << parameters.edition >> --ubuntu=<< parameters.ubuntu >> \ + --internal else # TODO: Don't ignore errors, temporary workaround until we fix #22955 /tmp/grabpl publish-docker --jobs 4 --edition << parameters.edition >> --ubuntu=<< parameters.ubuntu >> || echo Publishing failed! @@ -932,6 +947,14 @@ jobs: - run: name: npm - Prepare auth token command: "echo //registry.npmjs.org/:_authToken=$NPM_TOKEN >> ~/.npmrc" + - run: + name: Exit if release pipeline test + command: | + if [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then + # We're testing the release pipeline + echo "We're testing the release pipeline, so stopping before publishing" + circleci step halt + fi - run: name: Release packages command: ./scripts/build/release-packages.sh "${CIRCLE_TAG}" @@ -1004,172 +1027,146 @@ workflows: variant: armv6 name: build-oss-backend-armv6 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-master-or-release edition: oss variant: armv7 name: build-oss-backend-armv7 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-master-or-release edition: oss variant: armv7-musl name: build-oss-backend-armv7-musl requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-master-or-release edition: oss variant: arm64 name: build-oss-backend-arm64 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-master-or-release edition: oss variant: arm64-musl name: build-oss-backend-arm64-musl requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-all edition: oss variant: osx64 name: build-oss-backend-osx64 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-all edition: oss variant: win64 name: build-oss-backend-win64 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-all edition: oss variant: linux-x64 name: build-oss-backend-linux-x64 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-all edition: oss variant: linux-x64-musl name: build-oss-backend-linux-x64-musl requires: - - test-backend - - test-frontend + - lint-go - build-frontend: filters: *filter-all name: build-oss-frontend edition: oss - requires: - - test-backend - - test-frontend - build-plugins: filters: *filter-all name: build-oss-plugins edition: oss requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-master-or-release name: build-enterprise-backend-armv6 edition: enterprise variant: armv6 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-master-or-release name: build-enterprise-backend-armv7 edition: enterprise variant: armv7 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-master-or-release name: build-enterprise-backend-armv7-musl edition: enterprise variant: armv7-musl requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-master-or-release name: build-enterprise-backend-arm64 edition: enterprise variant: arm64 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-master-or-release name: build-enterprise-backend-arm64-musl edition: enterprise variant: arm64-musl requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-all name: build-enterprise-backend-osx64 edition: enterprise variant: osx64 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-all name: build-enterprise-backend-win64 edition: enterprise variant: win64 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-all name: build-enterprise-backend-linux-x64 edition: enterprise variant: linux-x64 requires: - - test-backend - - test-frontend + - lint-go - build-backend: filters: *filter-all name: build-enterprise-backend-linux-x64-musl edition: enterprise variant: linux-x64-musl requires: - - test-backend - - test-frontend + - lint-go - build-frontend: filters: *filter-all name: build-enterprise-frontend edition: enterprise - requires: - - test-backend - - test-frontend - build-plugins: filters: *filter-all name: build-enterprise-plugins edition: enterprise requires: - - test-backend - - test-frontend + - lint-go - build-release-publisher: filters: *filter-master-or-release - codespell: @@ -1244,12 +1241,6 @@ workflows: filters: *filter-only-master requires: - end-to-end-tests - - release-packages: - filters: *filter-only-release - requires: - - end-to-end-tests - - mysql-integration-test - - postgres-integration-test - publish-packages: filters: *filter-master-or-release name: publish-oss-packages @@ -1272,6 +1263,7 @@ workflows: - mysql-integration-test - postgres-integration-test - build-release-publisher + # Is this OK to run on Friday? - publish-storybook: filters: *filter-all requires: