diff --git a/.drone.yml b/.drone.yml index 5820ca55665..21ab4494ae5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,10 +14,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - ./bin/grabpl verify-drone - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -28,7 +28,7 @@ steps: DOCKERIZE_VERSION: 0.6.1 - name: lint-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition oss environment: @@ -37,7 +37,7 @@ steps: - initialize - name: codespell - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt" - codespell -I words_to_ignore.txt docs/ @@ -45,21 +45,21 @@ steps: - initialize - name: shellcheck - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl shellcheck depends_on: - initialize - name: check-dashboard-schemas - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - cue export --out openapi -o - ./dashboard-schemas/... depends_on: - initialize - name: test-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition oss @@ -69,7 +69,7 @@ steps: - lint-backend - name: test-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn run ci:test-frontend environment: @@ -78,7 +78,7 @@ steps: - initialize - name: build-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --variants linux-x64,linux-x64-musl,osx64,win64 --no-pull-enterprise depends_on: @@ -87,7 +87,7 @@ steps: - test-backend - name: build-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: @@ -95,7 +95,7 @@ steps: - test-frontend - name: build-plugins - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps depends_on: @@ -103,7 +103,7 @@ steps: - lint-backend - name: gen-version - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} depends_on: @@ -117,14 +117,14 @@ steps: - check-dashboard-schemas - name: package - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-x64,linux-x64-musl,osx64,win64 depends_on: - gen-version - name: end-to-end-tests-server - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -144,7 +144,7 @@ steps: - end-to-end-tests-server - name: build-storybook - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -154,7 +154,7 @@ steps: - package - name: build-frontend-docs - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./scripts/ci-reference-docs-lint.sh ci depends_on: @@ -171,7 +171,7 @@ steps: - build-frontend-docs - name: copy-packages-for-docker - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ @@ -188,7 +188,7 @@ steps: - copy-packages-for-docker - name: postgres-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq postgresql-client @@ -205,7 +205,7 @@ steps: - test-frontend - name: mysql-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq default-mysql-client @@ -256,10 +256,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - ./bin/grabpl verify-drone - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -282,7 +282,7 @@ steps: from_secret: drone_token - name: lint-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition oss environment: @@ -291,7 +291,7 @@ steps: - initialize - name: codespell - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt" - codespell -I words_to_ignore.txt docs/ @@ -299,21 +299,21 @@ steps: - initialize - name: shellcheck - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl shellcheck depends_on: - initialize - name: check-dashboard-schemas - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - cue export --out openapi -o - ./dashboard-schemas/... depends_on: - initialize - name: test-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition oss @@ -323,7 +323,7 @@ steps: - lint-backend - name: test-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn run ci:test-frontend environment: @@ -332,7 +332,7 @@ steps: - initialize - name: publish-frontend-metrics - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./scripts/ci-frontend-metrics.sh | ./bin/grabpl publish-metrics $${GRAFANA_MISC_STATS_API_KEY} environment: @@ -343,7 +343,7 @@ steps: - initialize - name: build-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: @@ -352,7 +352,7 @@ steps: - test-backend - name: build-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: @@ -360,7 +360,7 @@ steps: - test-frontend - name: build-plugins - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin environment: @@ -371,7 +371,7 @@ steps: - lint-backend - name: gen-version - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} depends_on: @@ -385,7 +385,7 @@ steps: - check-dashboard-schemas - name: package - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --sign environment: @@ -403,7 +403,7 @@ steps: - gen-version - name: end-to-end-tests-server - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -423,7 +423,7 @@ steps: - end-to-end-tests-server - name: build-storybook - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -446,14 +446,14 @@ steps: - end-to-end-tests - name: build-frontend-docs - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./scripts/ci-reference-docs-lint.sh ci depends_on: - build-frontend - name: copy-packages-for-docker - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ @@ -484,7 +484,7 @@ steps: - copy-packages-for-docker - name: postgres-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq postgresql-client @@ -501,7 +501,7 @@ steps: - test-frontend - name: mysql-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq default-mysql-client @@ -517,7 +517,7 @@ steps: - test-frontend - name: release-canary-npm-packages - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./scripts/circle-release-canary-packages.sh environment: @@ -529,7 +529,7 @@ steps: - name: upload-packages image: grafana/grafana-ci-deploy:1.3.1 commands: - - ./bin/grabpl upload-packages --edition oss + - ./bin/grabpl upload-packages --edition oss --packages-bucket grafana-downloads environment: GCP_GRAFANA_UPLOAD_KEY: from_secret: gcp_key @@ -539,6 +539,16 @@ steps: - mysql-integration-tests - postgres-integration-tests +- name: upload-cdn-assets + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition oss --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package + services: - name: postgres image: postgres:12.3-alpine @@ -581,7 +591,7 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/windows/grabpl.exe -OutFile grabpl.exe - .\grabpl.exe verify-drone - name: build-windows-installer @@ -628,10 +638,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - ./bin/grabpl verify-drone environment: @@ -680,7 +690,7 @@ steps: image: plugins/slack settings: channel: grafana-ci-notifications - template: "Build {{build.number}} failed: {{build.link}}" + template: "Build {{build.number}} failed for commit: : {{build.link}}\nAuthor: {{build.author}}" webhook: from_secret: slack_webhook @@ -713,10 +723,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - ./bin/grabpl verify-drone - ./bin/grabpl verify-version ${DRONE_TAG} @@ -728,7 +738,7 @@ steps: DOCKERIZE_VERSION: 0.6.1 - name: lint-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition oss environment: @@ -737,7 +747,7 @@ steps: - initialize - name: codespell - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt" - codespell -I words_to_ignore.txt docs/ @@ -745,21 +755,21 @@ steps: - initialize - name: shellcheck - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl shellcheck depends_on: - initialize - name: check-dashboard-schemas - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - cue export --out openapi -o - ./dashboard-schemas/... depends_on: - initialize - name: test-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition oss @@ -769,7 +779,7 @@ steps: - lint-backend - name: test-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn run ci:test-frontend environment: @@ -778,7 +788,7 @@ steps: - initialize - name: build-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise ${DRONE_TAG} environment: @@ -790,7 +800,7 @@ steps: - test-backend - name: build-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition oss --no-pull-enterprise ${DRONE_TAG} depends_on: @@ -798,7 +808,7 @@ steps: - test-frontend - name: build-plugins - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin environment: @@ -809,7 +819,7 @@ steps: - lint-backend - name: gen-version - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl gen-version ${DRONE_TAG} depends_on: @@ -823,7 +833,7 @@ steps: - check-dashboard-schemas - name: package - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign ${DRONE_TAG} environment: @@ -841,7 +851,7 @@ steps: - gen-version - name: end-to-end-tests-server - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -861,7 +871,7 @@ steps: - end-to-end-tests-server - name: build-storybook - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -871,7 +881,7 @@ steps: - package - name: copy-packages-for-docker - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ @@ -902,7 +912,7 @@ steps: - copy-packages-for-docker - name: postgres-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq postgresql-client @@ -919,7 +929,7 @@ steps: - test-frontend - name: mysql-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq default-mysql-client @@ -934,10 +944,20 @@ steps: - test-backend - test-frontend +- name: upload-cdn-assets + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition oss --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package + - name: upload-packages image: grafana/grafana-ci-deploy:1.3.1 commands: - - ./bin/grabpl upload-packages --edition oss + - ./bin/grabpl upload-packages --edition oss --packages-bucket grafana-downloads environment: GCP_GRAFANA_UPLOAD_KEY: from_secret: gcp_key @@ -962,7 +982,7 @@ steps: - end-to-end-tests - name: release-npm-packages - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./scripts/build/release-packages.sh ${DRONE_TAG} environment: @@ -1013,7 +1033,7 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/windows/grabpl.exe -OutFile grabpl.exe - .\grabpl.exe verify-drone - name: build-windows-installer @@ -1061,10 +1081,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: clone - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -1074,7 +1094,7 @@ steps: from_secret: github_token - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mv bin/grabpl /tmp/ - rmdir bin @@ -1094,7 +1114,7 @@ steps: - clone - name: lint-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition enterprise environment: @@ -1103,7 +1123,7 @@ steps: - initialize - name: codespell - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt" - codespell -I words_to_ignore.txt docs/ @@ -1111,21 +1131,21 @@ steps: - initialize - name: shellcheck - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl shellcheck depends_on: - initialize - name: check-dashboard-schemas - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - cue export --out openapi -o - ./dashboard-schemas/... depends_on: - initialize - name: test-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition enterprise @@ -1135,7 +1155,7 @@ steps: - lint-backend - name: test-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn run ci:test-frontend environment: @@ -1144,7 +1164,7 @@ steps: - initialize - name: build-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise ${DRONE_TAG} environment: @@ -1156,7 +1176,7 @@ steps: - test-backend - name: build-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition enterprise --no-pull-enterprise ${DRONE_TAG} depends_on: @@ -1164,7 +1184,7 @@ steps: - test-frontend - name: build-plugins - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin environment: @@ -1175,7 +1195,7 @@ steps: - lint-backend - name: lint-backend-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition enterprise2 environment: @@ -1184,7 +1204,7 @@ steps: - initialize - name: test-backend-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition enterprise2 @@ -1194,7 +1214,7 @@ steps: - lint-backend-enterprise2 - name: build-backend-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise ${DRONE_TAG} environment: @@ -1206,7 +1226,7 @@ steps: - test-backend-enterprise2 - name: gen-version - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl gen-version ${DRONE_TAG} depends_on: @@ -1222,7 +1242,7 @@ steps: - test-backend-enterprise2 - name: package - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign ${DRONE_TAG} environment: @@ -1240,7 +1260,7 @@ steps: - gen-version - name: end-to-end-tests-server - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -1262,7 +1282,7 @@ steps: - end-to-end-tests-server - name: copy-packages-for-docker - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ @@ -1293,7 +1313,7 @@ steps: - copy-packages-for-docker - name: postgres-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq postgresql-client @@ -1310,7 +1330,7 @@ steps: - test-frontend - name: mysql-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq default-mysql-client @@ -1325,10 +1345,20 @@ steps: - test-backend - test-frontend +- name: upload-cdn-assets + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition enterprise --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package + - name: upload-packages image: grafana/grafana-ci-deploy:1.3.1 commands: - - ./bin/grabpl upload-packages --edition enterprise + - ./bin/grabpl upload-packages --edition enterprise --packages-bucket grafana-downloads environment: GCP_GRAFANA_UPLOAD_KEY: from_secret: gcp_key @@ -1339,7 +1369,7 @@ steps: - postgres-integration-tests - name: package-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign ${DRONE_TAG} environment: @@ -1356,8 +1386,18 @@ steps: depends_on: - gen-version +- name: upload-cdn-assets-enterprise2 + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition enterprise2 --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package-enterprise2 + - name: end-to-end-tests-server-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -1434,7 +1474,7 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise - git checkout ${DRONE_TAG} @@ -1497,10 +1537,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - ./bin/grabpl verify-drone - ./bin/grabpl verify-version ${DRONE_TAG} @@ -1569,7 +1609,7 @@ steps: image: plugins/slack settings: channel: grafana-ci-notifications - template: "Build {{build.number}} failed: {{build.link}}" + template: "Build {{build.number}} failed for commit: : {{build.link}}\nAuthor: {{build.author}}" webhook: from_secret: slack_webhook @@ -1602,10 +1642,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - ./bin/grabpl verify-drone - ./bin/grabpl verify-version v7.3.0-test @@ -1617,7 +1657,7 @@ steps: DOCKERIZE_VERSION: 0.6.1 - name: lint-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition oss environment: @@ -1626,7 +1666,7 @@ steps: - initialize - name: codespell - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt" - codespell -I words_to_ignore.txt docs/ @@ -1634,21 +1674,21 @@ steps: - initialize - name: shellcheck - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl shellcheck depends_on: - initialize - name: check-dashboard-schemas - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - cue export --out openapi -o - ./dashboard-schemas/... depends_on: - initialize - name: test-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition oss @@ -1658,7 +1698,7 @@ steps: - lint-backend - name: test-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn run ci:test-frontend environment: @@ -1667,7 +1707,7 @@ steps: - initialize - name: build-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise v7.3.0-test environment: @@ -1679,7 +1719,7 @@ steps: - test-backend - name: build-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition oss --no-pull-enterprise v7.3.0-test depends_on: @@ -1687,7 +1727,7 @@ steps: - test-frontend - name: build-plugins - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin environment: @@ -1698,7 +1738,7 @@ steps: - lint-backend - name: gen-version - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl gen-version v7.3.0-test depends_on: @@ -1712,7 +1752,7 @@ steps: - check-dashboard-schemas - name: package - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign v7.3.0-test environment: @@ -1730,7 +1770,7 @@ steps: - gen-version - name: end-to-end-tests-server - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -1750,7 +1790,7 @@ steps: - end-to-end-tests-server - name: build-storybook - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -1760,7 +1800,7 @@ steps: - package - name: copy-packages-for-docker - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ @@ -1785,7 +1825,7 @@ steps: - copy-packages-for-docker - name: postgres-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq postgresql-client @@ -1802,7 +1842,7 @@ steps: - test-frontend - name: mysql-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq default-mysql-client @@ -1817,6 +1857,16 @@ steps: - test-backend - test-frontend +- name: upload-cdn-assets + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition oss --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package + - name: upload-packages image: grafana/grafana-ci-deploy:1.3.1 commands: @@ -1842,7 +1892,7 @@ steps: - end-to-end-tests - name: release-npm-packages - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 environment: GITHUB_PACKAGE_TOKEN: from_secret: github_package_token @@ -1891,7 +1941,7 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/windows/grabpl.exe -OutFile grabpl.exe - .\grabpl.exe verify-drone - name: build-windows-installer @@ -1939,10 +1989,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: clone - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -1952,7 +2002,7 @@ steps: from_secret: github_token - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mv bin/grabpl /tmp/ - rmdir bin @@ -1972,7 +2022,7 @@ steps: - clone - name: lint-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition enterprise environment: @@ -1981,7 +2031,7 @@ steps: - initialize - name: codespell - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt" - codespell -I words_to_ignore.txt docs/ @@ -1989,21 +2039,21 @@ steps: - initialize - name: shellcheck - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl shellcheck depends_on: - initialize - name: check-dashboard-schemas - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - cue export --out openapi -o - ./dashboard-schemas/... depends_on: - initialize - name: test-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition enterprise @@ -2013,7 +2063,7 @@ steps: - lint-backend - name: test-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn run ci:test-frontend environment: @@ -2022,7 +2072,7 @@ steps: - initialize - name: build-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise v7.3.0-test environment: @@ -2034,7 +2084,7 @@ steps: - test-backend - name: build-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition enterprise --no-pull-enterprise v7.3.0-test depends_on: @@ -2042,7 +2092,7 @@ steps: - test-frontend - name: build-plugins - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin environment: @@ -2053,7 +2103,7 @@ steps: - lint-backend - name: lint-backend-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition enterprise2 environment: @@ -2062,7 +2112,7 @@ steps: - initialize - name: test-backend-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition enterprise2 @@ -2072,7 +2122,7 @@ steps: - lint-backend-enterprise2 - name: build-backend-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise v7.3.0-test environment: @@ -2084,7 +2134,7 @@ steps: - test-backend-enterprise2 - name: gen-version - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl gen-version v7.3.0-test depends_on: @@ -2100,7 +2150,7 @@ steps: - test-backend-enterprise2 - name: package - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign v7.3.0-test environment: @@ -2118,7 +2168,7 @@ steps: - gen-version - name: end-to-end-tests-server - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -2140,7 +2190,7 @@ steps: - end-to-end-tests-server - name: copy-packages-for-docker - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ @@ -2165,7 +2215,7 @@ steps: - copy-packages-for-docker - name: postgres-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq postgresql-client @@ -2182,7 +2232,7 @@ steps: - test-frontend - name: mysql-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq default-mysql-client @@ -2197,6 +2247,16 @@ steps: - test-backend - test-frontend +- name: upload-cdn-assets + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition enterprise --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package + - name: upload-packages image: grafana/grafana-ci-deploy:1.3.1 commands: @@ -2211,7 +2271,7 @@ steps: - postgres-integration-tests - name: package-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign v7.3.0-test environment: @@ -2228,8 +2288,18 @@ steps: depends_on: - gen-version +- name: upload-cdn-assets-enterprise2 + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition enterprise2 --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package-enterprise2 + - name: end-to-end-tests-server-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -2306,7 +2376,7 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise - git checkout master @@ -2369,10 +2439,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - ./bin/grabpl verify-drone - ./bin/grabpl verify-version v7.3.0-test @@ -2441,7 +2511,7 @@ steps: image: plugins/slack settings: channel: grafana-ci-notifications - template: "Build {{build.number}} failed: {{build.link}}" + template: "Build {{build.number}} failed for commit: : {{build.link}}\nAuthor: {{build.author}}" webhook: from_secret: slack_webhook @@ -2474,10 +2544,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - ./bin/grabpl verify-drone - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -2488,7 +2558,7 @@ steps: DOCKERIZE_VERSION: 0.6.1 - name: lint-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition oss environment: @@ -2497,7 +2567,7 @@ steps: - initialize - name: codespell - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt" - codespell -I words_to_ignore.txt docs/ @@ -2505,21 +2575,21 @@ steps: - initialize - name: shellcheck - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl shellcheck depends_on: - initialize - name: check-dashboard-schemas - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - cue export --out openapi -o - ./dashboard-schemas/... depends_on: - initialize - name: test-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition oss @@ -2529,7 +2599,7 @@ steps: - lint-backend - name: test-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn run ci:test-frontend environment: @@ -2538,7 +2608,7 @@ steps: - initialize - name: build-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: @@ -2547,7 +2617,7 @@ steps: - test-backend - name: build-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: @@ -2555,7 +2625,7 @@ steps: - test-frontend - name: build-plugins - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin environment: @@ -2566,7 +2636,7 @@ steps: - lint-backend - name: gen-version - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} depends_on: @@ -2580,7 +2650,7 @@ steps: - check-dashboard-schemas - name: package - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --sign environment: @@ -2598,7 +2668,7 @@ steps: - gen-version - name: end-to-end-tests-server - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -2618,7 +2688,7 @@ steps: - end-to-end-tests-server - name: build-storybook - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -2628,7 +2698,7 @@ steps: - package - name: copy-packages-for-docker - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ @@ -2653,7 +2723,7 @@ steps: - copy-packages-for-docker - name: postgres-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq postgresql-client @@ -2670,7 +2740,7 @@ steps: - test-frontend - name: mysql-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq default-mysql-client @@ -2685,10 +2755,20 @@ steps: - test-backend - test-frontend +- name: upload-cdn-assets + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition oss --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package + - name: upload-packages image: grafana/grafana-ci-deploy:1.3.1 commands: - - ./bin/grabpl upload-packages --edition oss + - ./bin/grabpl upload-packages --edition oss --packages-bucket grafana-downloads environment: GCP_GRAFANA_UPLOAD_KEY: from_secret: gcp_key @@ -2738,7 +2818,7 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/windows/grabpl.exe -OutFile grabpl.exe - .\grabpl.exe verify-drone - name: build-windows-installer @@ -2782,10 +2862,10 @@ steps: - echo $DRONE_RUNNER_NAME - name: clone - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/grabpl - chmod +x bin/grabpl - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -2795,7 +2875,7 @@ steps: from_secret: github_token - name: initialize - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - mv bin/grabpl /tmp/ - rmdir bin @@ -2814,7 +2894,7 @@ steps: - clone - name: lint-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition enterprise environment: @@ -2823,7 +2903,7 @@ steps: - initialize - name: codespell - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt" - codespell -I words_to_ignore.txt docs/ @@ -2831,21 +2911,21 @@ steps: - initialize - name: shellcheck - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl shellcheck depends_on: - initialize - name: check-dashboard-schemas - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - cue export --out openapi -o - ./dashboard-schemas/... depends_on: - initialize - name: test-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition enterprise @@ -2855,7 +2935,7 @@ steps: - lint-backend - name: test-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn run ci:test-frontend environment: @@ -2864,7 +2944,7 @@ steps: - initialize - name: build-backend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: @@ -2873,7 +2953,7 @@ steps: - test-backend - name: build-frontend - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition enterprise --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: @@ -2881,7 +2961,7 @@ steps: - test-frontend - name: build-plugins - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin environment: @@ -2892,7 +2972,7 @@ steps: - lint-backend - name: lint-backend-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl lint-backend --edition enterprise2 environment: @@ -2901,7 +2981,7 @@ steps: - initialize - name: test-backend-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - ./bin/grabpl test-backend --edition enterprise2 @@ -2911,7 +2991,7 @@ steps: - lint-backend-enterprise2 - name: build-backend-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER} --variants linux-x64 --no-pull-enterprise depends_on: @@ -2920,7 +3000,7 @@ steps: - test-backend-enterprise2 - name: gen-version - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} depends_on: @@ -2936,7 +3016,7 @@ steps: - test-backend-enterprise2 - name: package - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --sign environment: @@ -2954,7 +3034,7 @@ steps: - gen-version - name: end-to-end-tests-server - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -2976,7 +3056,7 @@ steps: - end-to-end-tests-server - name: build-storybook - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - yarn storybook:build - ./bin/grabpl verify-storybook @@ -2986,7 +3066,7 @@ steps: - package - name: copy-packages-for-docker - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ @@ -3011,7 +3091,7 @@ steps: - copy-packages-for-docker - name: postgres-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq postgresql-client @@ -3028,7 +3108,7 @@ steps: - test-frontend - name: mysql-integration-tests - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - apt-get update - apt-get install -yq default-mysql-client @@ -3043,10 +3123,20 @@ steps: - test-backend - test-frontend +- name: upload-cdn-assets + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition enterprise --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package + - name: upload-packages image: grafana/grafana-ci-deploy:1.3.1 commands: - - ./bin/grabpl upload-packages --edition enterprise + - ./bin/grabpl upload-packages --edition enterprise --packages-bucket grafana-downloads environment: GCP_GRAFANA_UPLOAD_KEY: from_secret: gcp_key @@ -3057,7 +3147,7 @@ steps: - postgres-integration-tests - name: package-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 commands: - ./bin/grabpl package --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-x64 --sign environment: @@ -3074,8 +3164,18 @@ steps: depends_on: - gen-version +- name: upload-cdn-assets-enterprise2 + image: grafana/grafana-ci-deploy:1.3.1 + commands: + - ./bin/grabpl upload-cdn --edition enterprise2 --bucket "grafana-static-assets" + environment: + GCP_GRAFANA_UPLOAD_KEY: + from_secret: gcp_key + depends_on: + - package-enterprise2 + - name: end-to-end-tests-server-enterprise2 - image: grafana/build-container:1.3.1 + image: grafana/build-container:1.3.2 detach: true commands: - ./e2e/start-server @@ -3152,7 +3252,7 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.36/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.38/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise - git checkout $$env:DRONE_BRANCH @@ -3209,7 +3309,7 @@ steps: image: plugins/slack settings: channel: grafana-ci-notifications - template: "Build {{build.number}} failed: {{build.link}}" + template: "Build {{build.number}} failed for commit: : {{build.link}}\nAuthor: {{build.author}}" webhook: from_secret: slack_webhook diff --git a/scripts/lib.star b/scripts/lib.star index 46af1c112b9..da927b8f462 100644 --- a/scripts/lib.star +++ b/scripts/lib.star @@ -1,5 +1,5 @@ -grabpl_version = '0.5.36' -build_image = 'grafana/build-container:1.3.1' +grabpl_version = '0.5.38' +build_image = 'grafana/build-container:1.3.2' publish_image = 'grafana/grafana-ci-deploy:1.3.1' grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2' alpine_image = 'alpine:3.12' @@ -71,7 +71,7 @@ def slack_step(channel): 'from_secret': 'slack_webhook', }, 'channel': channel, - 'template': 'Build {{build.number}} failed: {{build.link}}', + 'template': 'Build {{build.number}} failed for commit: : {{build.link}}\nAuthor: {{build.author}}', }, } @@ -206,11 +206,8 @@ def enterprise_downstream_step(edition): } def lint_backend_step(edition): - sfx = '' - if edition == 'enterprise2': - sfx = '-{}'.format(edition) return { - 'name': 'lint-backend' + sfx, + 'name': 'lint-backend' + enterprise2_sfx(edition), 'image': build_image, 'environment': { # We need CGO because of go-sqlite3 @@ -309,15 +306,28 @@ def publish_storybook_step(edition, ver_mode): 'commands': commands, } +def upload_cdn(edition): + return { + 'name': 'upload-cdn-assets' + enterprise2_sfx(edition), + 'image': publish_image, + 'depends_on': [ + 'package' + enterprise2_sfx(edition), + ], + 'environment': { + 'GCP_GRAFANA_UPLOAD_KEY': { + 'from_secret': 'gcp_key', + }, + }, + 'commands': [ + './bin/grabpl upload-cdn --edition {} --bucket "grafana-static-assets"'.format(edition), + ], + } + def build_backend_step(edition, ver_mode, variants=None, is_downstream=False): variants_str = '' if variants: variants_str = ' --variants {}'.format(','.join(variants)) - sfx = '' - if edition == 'enterprise2': - sfx = '-{}'.format(edition) - # TODO: Convert number of jobs to percentage if ver_mode == 'release': env = { @@ -354,12 +364,12 @@ def build_backend_step(edition, ver_mode, variants=None, is_downstream=False): ] return { - 'name': 'build-backend' + sfx, + 'name': 'build-backend' + enterprise2_sfx(edition), 'image': build_image, 'depends_on': [ 'initialize', - 'lint-backend' + sfx, - 'test-backend' + sfx, + 'lint-backend' + enterprise2_sfx(edition), + 'test-backend' + enterprise2_sfx(edition), ], 'environment': env, 'commands': cmds, @@ -436,16 +446,12 @@ def build_plugins_step(edition, sign=False): } def test_backend_step(edition): - sfx = '' - if edition == 'enterprise2': - sfx = '-{}'.format(edition) - return { - 'name': 'test-backend' + sfx, + 'name': 'test-backend' + enterprise2_sfx(edition), 'image': build_image, 'depends_on': [ 'initialize', - 'lint-backend' + sfx, + 'lint-backend' + enterprise2_sfx(edition), ], 'commands': [ # First make sure that there are no tests with FocusConvey @@ -576,10 +582,6 @@ def package_step(edition, ver_mode, variants=None, is_downstream=False): if variants: variants_str = ' --variants {}'.format(','.join(variants)) - sfx = '' - if edition == 'enterprise2': - sfx = '-{}'.format(edition) - if ver_mode in ('master', 'release', 'test-release', 'release-branch'): sign_args = ' --sign' env = { @@ -631,7 +633,7 @@ def package_step(edition, ver_mode, variants=None, is_downstream=False): ] return { - 'name': 'package' + sfx, + 'name': 'package' + enterprise2_sfx(edition), 'image': build_image, 'depends_on': [ # This step should have all the dependencies required for packaging, and should generate @@ -643,11 +645,9 @@ def package_step(edition, ver_mode, variants=None, is_downstream=False): } def e2e_tests_server_step(edition, port=3001): - sfx = '' package_file_pfx = '' if edition == 'enterprise2': - sfx = '-{}'.format(edition) - package_file_pfx = 'grafana' + sfx + package_file_pfx = 'grafana' + enterprise2_sfx(edition) elif edition == 'enterprise': package_file_pfx = 'grafana-' + edition @@ -659,11 +659,11 @@ def e2e_tests_server_step(edition, port=3001): environment['RUNDIR'] = 'e2e/tmp-{}'.format(package_file_pfx) return { - 'name': 'end-to-end-tests-server' + sfx, + 'name': 'end-to-end-tests-server' + enterprise2_sfx(edition), 'image': build_image, 'detach': True, 'depends_on': [ - 'package' + sfx, + 'package' + enterprise2_sfx(edition), ], 'environment': environment, 'commands': [ @@ -672,18 +672,14 @@ def e2e_tests_server_step(edition, port=3001): } def e2e_tests_step(edition, port=3001): - sfx = '' - if edition == 'enterprise2': - sfx = '-{}'.format(edition) - return { - 'name': 'end-to-end-tests' + sfx, + 'name': 'end-to-end-tests' + enterprise2_sfx(edition), 'image': 'grafana/ci-e2e:12.19.0-1', 'depends_on': [ - 'end-to-end-tests-server' + sfx, + 'end-to-end-tests-server' + enterprise2_sfx(edition), ], 'environment': { - 'HOST': 'end-to-end-tests-server' + sfx, + 'HOST': 'end-to-end-tests-server' + enterprise2_sfx(edition), }, 'commands': [ # Have to re-install Cypress since it insists on searching for its binary beneath /root/.cache, @@ -726,14 +722,16 @@ def build_docker_images_step(edition, ver_mode, archs=None, ubuntu=False, publis if ver_mode == 'test-release': publish = False - sfx = '' + ubuntu_sfx = '' if ubuntu: - sfx = '-ubuntu' + ubuntu_sfx = '-ubuntu' + settings = { 'dry_run': not publish, 'edition': edition, 'ubuntu': ubuntu, } + if publish: settings['username'] = { 'from_secret': 'docker_user', @@ -744,11 +742,9 @@ def build_docker_images_step(edition, ver_mode, archs=None, ubuntu=False, publis if archs: settings['archs'] = ','.join(archs) return { - 'name': 'build-docker-images' + sfx, + 'name': 'build-docker-images' + ubuntu_sfx, 'image': grafana_docker_image, - 'depends_on': [ - 'copy-packages-for-docker', - ], + 'depends_on': ['copy-packages-for-docker'], 'settings': settings, } @@ -840,15 +836,16 @@ def deploy_to_kubernetes_step(edition, is_downstream=False): ], } +def enterprise2_sfx(edition): + if edition == 'enterprise2': + return '-{}'.format(edition) + return '' + def upload_packages_step(edition, ver_mode, is_downstream=False): if ver_mode == 'master' and edition in ('enterprise', 'enterprise2') and not is_downstream: return None - sfx = '' - packages_bucket = '' - if edition == 'enterprise2': - sfx = '-{}'.format(edition) - packages_bucket = ' --packages-bucket grafana-downloads' + sfx + packages_bucket = ' --packages-bucket grafana-downloads' + enterprise2_sfx(edition) if ver_mode == 'test-release': cmd = './bin/grabpl upload-packages --edition {} '.format(edition) + \ @@ -857,11 +854,11 @@ def upload_packages_step(edition, ver_mode, is_downstream=False): cmd = './bin/grabpl upload-packages --edition {}{}'.format(edition, packages_bucket) return { - 'name': 'upload-packages' + sfx, + 'name': 'upload-packages' + enterprise2_sfx(edition), 'image': publish_image, 'depends_on': [ - 'package' + sfx, - 'end-to-end-tests' + sfx, + 'package' + enterprise2_sfx(edition), + 'end-to-end-tests' + enterprise2_sfx(edition), 'mysql-integration-tests', 'postgres-integration-tests', ], diff --git a/scripts/master.star b/scripts/master.star index d2d098ed62f..f01a8dad31e 100644 --- a/scripts/master.star +++ b/scripts/master.star @@ -32,6 +32,7 @@ load( 'publish_packages_step', 'notify_pipeline', 'integration_test_services', + 'upload_cdn' ) ver_mode = 'master' @@ -79,7 +80,9 @@ def get_steps(edition, is_downstream=False): release_canary_npm_packages_step(edition), upload_packages_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream), deploy_to_kubernetes_step(edition=edition, is_downstream=is_downstream), + upload_cdn(edition=edition) ]) + if include_enterprise2: edition2 = 'enterprise2' steps.extend([ @@ -87,6 +90,7 @@ def get_steps(edition, is_downstream=False): e2e_tests_server_step(edition=edition2, port=3002), e2e_tests_step(edition=edition2, port=3002), upload_packages_step(edition=edition2, ver_mode=ver_mode, is_downstream=is_downstream), + upload_cdn(edition=edition2) ]) windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream) diff --git a/scripts/release.star b/scripts/release.star index a18503c81bd..b064502a1e1 100644 --- a/scripts/release.star +++ b/scripts/release.star @@ -31,6 +31,7 @@ load( 'notify_pipeline', 'integration_test_services', 'publish_packages_step', + 'upload_cdn' ) def release_npm_packages_step(edition, ver_mode): @@ -99,7 +100,9 @@ def get_steps(edition, ver_mode): postgres_integration_tests_step(), mysql_integration_tests_step(), ]) + if should_upload: + steps.append(upload_cdn(edition=edition)) steps.append(upload_packages_step(edition=edition, ver_mode=ver_mode)) if should_publish: steps.extend([ @@ -112,6 +115,7 @@ def get_steps(edition, ver_mode): edition2 = 'enterprise2' steps.extend([ package_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64']), + upload_cdn(edition=edition2), e2e_tests_server_step(edition=edition2, port=3002), e2e_tests_step(edition=edition2, port=3002), ])