From 27fbe82bf125eb987a7817c6b39e19a2264bd7cc Mon Sep 17 00:00:00 2001 From: Dimitris Sotirakis Date: Wed, 19 Jan 2022 18:42:40 +0200 Subject: [PATCH] Remove test-release pipelines (#44220) --- .drone.star | 4 +- .drone.yml | 1334 +------------------------- scripts/drone/pipelines/release.star | 37 +- scripts/drone/steps/lib.star | 90 +- 4 files changed, 24 insertions(+), 1441 deletions(-) diff --git a/.drone.star b/.drone.star index a90a3027b23..f025f8df415 100644 --- a/.drone.star +++ b/.drone.star @@ -6,7 +6,7 @@ load('scripts/drone/pipelines/pr.star', 'pr_pipelines') load('scripts/drone/pipelines/main.star', 'main_pipelines') -load('scripts/drone/pipelines/release.star', 'release_pipelines', 'test_release_pipelines', 'publish_image_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline') +load('scripts/drone/pipelines/release.star', 'release_pipelines', 'publish_image_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline') load('scripts/drone/version.star', 'version_branch_pipelines') load('scripts/drone/pipelines/cron.star', 'cronjobs') load('scripts/drone/vault.star', 'secrets') @@ -17,4 +17,4 @@ def main(ctx): publish_image_pipelines('public') + publish_image_pipelines('security') + \ publish_artifacts_pipelines('security') + publish_artifacts_pipelines('public') + \ publish_npm_pipelines('public') + publish_packages_pipeline() + \ - test_release_pipelines() + version_branch_pipelines() + cronjobs(edition=edition) + secrets() + version_branch_pipelines() + cronjobs(edition=edition) + secrets() diff --git a/.drone.yml b/.drone.yml index 955f5b38329..5112228718b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2847,1338 +2847,6 @@ volumes: --- depends_on: [] kind: pipeline -name: oss-build-publish-e2e-test-release -node: - type: no-parallel -platform: - arch: amd64 - os: linux -services: [] -steps: -- commands: - - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl - - chmod +x bin/grabpl - image: byrnedo/alpine-curl:0.1.8 - name: grabpl -- commands: - - echo $DRONE_RUNNER_NAME - image: alpine:3.15 - name: identify-runner -- commands: - - make gen-go - - ./bin/grabpl verify-version v7.3.0-test - - ./bin/grabpl gen-version v7.3.0-test - - yarn install --immutable - image: grafana/build-container:1.4.9 - name: initialize -- commands: - - ./bin/grabpl build-backend --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} - --no-pull-enterprise v7.3.0-test - depends_on: - - initialize - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/build-container:1.4.9 - name: build-backend -- 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: - - initialize - environment: - NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.4.9 - name: build-frontend -- commands: - - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin - depends_on: - - initialize - environment: - GRAFANA_API_KEY: - from_secret: grafana_api_key - image: grafana/build-container:1.4.9 - name: build-plugins -- commands: - - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . - depends_on: - - build-backend - image: grafana/build-container:1.4.9 - name: validate-scuemata -- commands: - - '# Make sure the git tree is clean.' - - '# Stashing changes, since packages that were produced in build-backend step are - needed.' - - git stash - - ./bin/linux-amd64/grafana-cli cue gen-ts --grafana-root . - - '# The above command generates Typescript files (*.gen.ts) from all appropriate - .cue files.' - - '# It is required that the generated Typescript be in sync with the input CUE - files.' - - '# ...Modulo eslint auto-fixes...:' - - yarn run eslint . --ext .gen.ts --fix - - '# If any filenames are emitted by the below script, run the generator command - `grafana-cli cue gen-ts` locally and commit the result.' - - ./scripts/clean-git-or-error.sh - - '# Un-stash changes.' - - git stash pop - depends_on: - - validate-scuemata - image: grafana/build-container:1.4.9 - name: ensure-cuetsified -- commands: - - ./bin/grabpl package --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise - --sign v7.3.0-test - depends_on: - - build-plugins - - build-backend - - build-frontend - environment: - GITHUB_TOKEN: - from_secret: github_token - GPG_KEY_PASSWORD: - from_secret: gpg_key_password - GPG_PRIV_KEY: - from_secret: gpg_priv_key - GPG_PUB_KEY: - from_secret: gpg_pub_key - GRAFANA_API_KEY: - from_secret: grafana_api_key - image: grafana/build-container:1.4.9 - name: package -- commands: - - ls dist/*.tar.gz* - - cp dist/*.tar.gz* packaging/docker/ - depends_on: - - package - image: grafana/build-container:1.4.9 - name: copy-packages-for-docker -- commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - - ./bin/grabpl build-docker --edition oss --shouldSave - depends_on: - - copy-packages-for-docker - environment: - GCP_KEY: - from_secret: gcp_key - image: google/cloud-sdk - name: package-docker-images - volumes: - - name: docker - path: /var/run/docker.sock -- commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - - ./bin/grabpl build-docker --edition oss --shouldSave --ubuntu - depends_on: - - copy-packages-for-docker - environment: - GCP_KEY: - from_secret: gcp_key - image: google/cloud-sdk - name: package-docker-images-ubuntu - volumes: - - name: docker - path: /var/run/docker.sock -- commands: - - ./e2e/start-server - depends_on: - - package - detach: true - environment: - PORT: 3001 - image: grafana/build-container:1.4.9 - name: end-to-end-tests-server -- commands: - - apt-get install -y netcat - - ./bin/grabpl e2e-tests --port 3001 --suite dashboards-suite --tries 3 - depends_on: - - package - environment: - HOST: end-to-end-tests-server - image: cypress/included:9.2.0 - name: end-to-end-tests-dashboards-suite -- commands: - - apt-get install -y netcat - - ./bin/grabpl e2e-tests --port 3001 --suite smoke-tests-suite --tries 3 - depends_on: - - package - environment: - HOST: end-to-end-tests-server - image: cypress/included:9.2.0 - name: end-to-end-tests-smoke-tests-suite -- commands: - - apt-get install -y netcat - - ./bin/grabpl e2e-tests --port 3001 --suite panels-suite --tries 3 - depends_on: - - package - environment: - HOST: end-to-end-tests-server - image: cypress/included:9.2.0 - name: end-to-end-tests-panels-suite -- commands: - - apt-get install -y netcat - - ./bin/grabpl e2e-tests --port 3001 --suite various-suite --tries 3 - depends_on: - - package - environment: - HOST: end-to-end-tests-server - image: cypress/included:9.2.0 - name: end-to-end-tests-various-suite -- commands: - - apt-get update - - apt-get install -yq zip - - ls -lah ./e2e - - find ./e2e -type f -name "*.mp4" - - printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey_upload_artifacts.json - - find ./e2e -type f -name "*spec.ts.mp4" | zip e2e/videos.zip -@ - - gsutil cp e2e/videos.zip gs://$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip - - export E2E_ARTIFACTS_VIDEO_ZIP=https://storage.googleapis.com/$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip - - 'echo "E2E Test artifacts uploaded to: $${E2E_ARTIFACTS_VIDEO_ZIP}"' - - 'curl -X POST https://api.github.com/repos/${DRONE_REPO}/statuses/${DRONE_COMMIT_SHA} - -H "Authorization: token $${GITHUB_TOKEN}" -d "{\"state\":\"success\",\"target_url\":\"$${E2E_ARTIFACTS_VIDEO_ZIP}\", - \"description\": \"Click on the details to download e2e recording videos\", \"context\": - \"e2e_artifacts\"}"' - depends_on: - - end-to-end-tests-dashboards-suite - - end-to-end-tests-panels-suite - - end-to-end-tests-smoke-tests-suite - - end-to-end-tests-various-suite - environment: - E2E_TEST_ARTIFACTS_BUCKET: releng-pipeline-artifacts-dev - GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY: - from_secret: gcp_upload_artifacts_key - GITHUB_TOKEN: - from_secret: github_token - image: google/cloud-sdk:367.0.0 - name: e2e-tests-artifacts-upload - when: - status: - - success - - failure -- commands: - - yarn storybook:build - - ./bin/grabpl verify-storybook - depends_on: - - build-frontend - environment: - NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.4.9 - name: build-storybook -- commands: - - ./bin/grabpl upload-cdn --edition oss --bucket "grafana-static-assets" - depends_on: - - end-to-end-tests-server - environment: - GCP_GRAFANA_UPLOAD_KEY: - from_secret: gcp_key - PRERELEASE_BUCKET: - from_secret: prerelease_bucket - image: grafana/grafana-ci-deploy:1.3.1 - name: upload-cdn-assets -- commands: - - ./bin/grabpl upload-packages --edition oss --packages-bucket grafana-downloads-test - depends_on: - - end-to-end-tests-dashboards-suite - - end-to-end-tests-panels-suite - - end-to-end-tests-smoke-tests-suite - - end-to-end-tests-various-suite - environment: - GCP_GRAFANA_UPLOAD_KEY: - from_secret: gcp_key - PRERELEASE_BUCKET: - from_secret: prerelease_bucket - image: grafana/grafana-ci-deploy:1.3.1 - name: upload-packages -- commands: - - echo Testing release - depends_on: - - build-storybook - - end-to-end-tests-dashboards-suite - - end-to-end-tests-panels-suite - - end-to-end-tests-smoke-tests-suite - - end-to-end-tests-various-suite - environment: - GCP_KEY: - from_secret: gcp_key - PRERELEASE_BUCKET: - from_secret: prerelease_bucket - image: grafana/grafana-ci-deploy:1.3.1 - name: store-storybook -trigger: - event: - - custom -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker -- name: postgres - temp: - medium: memory -- name: mysql - temp: - medium: memory ---- -depends_on: [] -kind: pipeline -name: oss-test-test-release -node: - type: no-parallel -platform: - arch: amd64 - os: linux -services: [] -steps: -- commands: - - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl - - chmod +x bin/grabpl - image: byrnedo/alpine-curl:0.1.8 - name: grabpl -- commands: - - echo $DRONE_RUNNER_NAME - image: alpine:3.15 - name: identify-runner -- commands: - - make gen-go - - ./bin/grabpl verify-version v7.3.0-test - - ./bin/grabpl gen-version v7.3.0-test - - yarn install --immutable - image: grafana/build-container:1.4.9 - name: initialize -- commands: - - |- - echo -e "unknwon - referer - errorstring - eror - iam - wan" > words_to_ignore.txt - - codespell -I words_to_ignore.txt docs/ - - rm words_to_ignore.txt - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: codespell -- commands: - - ./bin/grabpl shellcheck - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: shellcheck -- commands: - - ./bin/grabpl lint-backend --edition oss - depends_on: - - initialize - environment: - CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 - name: lint-backend -- commands: - - yarn run prettier:check - - yarn run lint - - yarn run i18n:compile - - yarn run typecheck - depends_on: - - initialize - environment: - TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 - name: lint-frontend -- commands: - - ./bin/grabpl test-backend --edition oss - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: test-backend -- commands: - - ./bin/grabpl integration-tests --edition oss - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: test-backend-integration -- commands: - - yarn run ci:test-frontend - depends_on: - - initialize - environment: - TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 - name: test-frontend -trigger: - event: - - custom -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker ---- -depends_on: [] -kind: pipeline -name: oss-integration-tests-test-release -node: - type: no-parallel -platform: - arch: amd64 - os: linux -services: -- environment: - PGDATA: /var/lib/postgresql/data/pgdata - POSTGRES_DB: grafanatest - POSTGRES_PASSWORD: grafanatest - POSTGRES_USER: grafanatest - image: postgres:12.3-alpine - name: postgres - volumes: - - name: postgres - path: /var/lib/postgresql/data/pgdata -- environment: - MYSQL_DATABASE: grafana_tests - MYSQL_PASSWORD: password - MYSQL_ROOT_PASSWORD: rootpass - MYSQL_USER: grafana - image: mysql:5.6.48 - name: mysql - volumes: - - name: mysql - path: /var/lib/mysql -steps: -- commands: - - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl - - chmod +x bin/grabpl - image: byrnedo/alpine-curl:0.1.8 - name: grabpl -- commands: - - echo $DRONE_RUNNER_NAME - image: alpine:3.15 - name: identify-runner -- commands: - - make gen-go - - ./bin/grabpl verify-version v7.3.0-test - - ./bin/grabpl gen-version v7.3.0-test - - yarn install --immutable - image: grafana/build-container:1.4.9 - name: initialize -- commands: - - apt-get update - - apt-get install -yq postgresql-client - - dockerize -wait tcp://postgres:5432 -timeout 120s - - psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql - - go clean -testcache - - ./bin/grabpl integration-tests --database postgres - depends_on: - - grabpl - environment: - GRAFANA_TEST_DB: postgres - PGPASSWORD: grafanatest - POSTGRES_HOST: postgres - image: grafana/build-container:1.4.9 - name: postgres-integration-tests -- commands: - - apt-get update - - apt-get install -yq default-mysql-client - - dockerize -wait tcp://mysql:3306 -timeout 120s - - cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root - -prootpass - - go clean -testcache - - ./bin/grabpl integration-tests --database mysql - depends_on: - - grabpl - environment: - GRAFANA_TEST_DB: mysql - MYSQL_HOST: mysql - image: grafana/build-container:1.4.9 - name: mysql-integration-tests -trigger: - event: - - custom -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker -- name: postgres - temp: - medium: memory -- name: mysql - temp: - medium: memory ---- -depends_on: -- oss-build-publish-e2e-test-release -- oss-test-test-release -- oss-integration-tests-test-release -kind: pipeline -name: oss-windows-test-release -platform: - arch: amd64 - os: windows - version: "1809" -services: [] -steps: -- commands: - - echo $env:DRONE_RUNNER_NAME - image: mcr.microsoft.com/windows:1809 - name: identify-runner -- commands: - - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/windows/grabpl.exe - -OutFile grabpl.exe - image: grafana/ci-wix:0.1.1 - name: initialize -- commands: - - $$gcpKey = $$env:GCP_KEY - - '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey)) - > gcpkey.json' - - dos2unix gcpkey.json - - gcloud auth activate-service-account --key-file=gcpkey.json - - rm gcpkey.json - - cp C:\App\nssm-2.24.zip . - - .\grabpl.exe gen-version v7.3.0-test - - .\grabpl.exe windows-installer --edition oss --packages-bucket grafana-downloads-test - v7.3.0-test - - $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0] - - gsutil cp $$fname gs://grafana-downloads-test/v7.3.0-test/oss/release/ - - gsutil cp "$$fname.sha256" gs://grafana-downloads-test/v7.3.0-test/oss/release/ - depends_on: - - initialize - environment: - GCP_KEY: - from_secret: gcp_key - GITHUB_TOKEN: - from_secret: github_token - PRERELEASE_BUCKET: - from_secret: prerelease_bucket - image: grafana/ci-wix:0.1.1 - name: build-windows-installer -trigger: - event: - - custom -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker ---- -clone: - disable: true -depends_on: [] -image_pull_secrets: -- dockerconfigjson -kind: pipeline -name: enterprise-build-e2e-publish-test-release -node: - type: no-parallel -platform: - arch: amd64 - os: linux -services: [] -steps: -- commands: - - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl - - chmod +x bin/grabpl - image: byrnedo/alpine-curl:0.1.8 - name: grabpl -- commands: - - echo $DRONE_RUNNER_NAME - image: alpine:3.15 - name: identify-runner -- commands: - - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - - cd grafana-enterprise - - git checkout main - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/build-container:1.4.9 - name: clone-enterprise -- commands: - - mv bin/grabpl /tmp/ - - rmdir bin - - mv grafana-enterprise /tmp/ - - /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise - - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json - - mkdir bin - - mv /tmp/grabpl bin/ - - make gen-go - - ./bin/grabpl verify-version v7.3.0-test - - ./bin/grabpl gen-version v7.3.0-test - - yarn install --immutable - depends_on: - - clone-enterprise - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/build-container:1.4.9 - name: initialize -- commands: - - ./bin/grabpl build-backend --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} - --no-pull-enterprise v7.3.0-test - depends_on: - - initialize - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/build-container:1.4.9 - name: build-backend -- 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: - - initialize - environment: - NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.4.9 - name: build-frontend -- commands: - - ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign - --signing-admin - depends_on: - - initialize - environment: - GRAFANA_API_KEY: - from_secret: grafana_api_key - image: grafana/build-container:1.4.9 - name: build-plugins -- commands: - - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . - depends_on: - - build-backend - image: grafana/build-container:1.4.9 - name: validate-scuemata -- commands: - - '# Make sure the git tree is clean.' - - '# Stashing changes, since packages that were produced in build-backend step are - needed.' - - git stash - - ./bin/linux-amd64/grafana-cli cue gen-ts --grafana-root . - - '# The above command generates Typescript files (*.gen.ts) from all appropriate - .cue files.' - - '# It is required that the generated Typescript be in sync with the input CUE - files.' - - '# ...Modulo eslint auto-fixes...:' - - yarn run eslint . --ext .gen.ts --fix - - '# If any filenames are emitted by the below script, run the generator command - `grafana-cli cue gen-ts` locally and commit the result.' - - ./scripts/clean-git-or-error.sh - - '# Un-stash changes.' - - git stash pop - depends_on: - - validate-scuemata - image: grafana/build-container:1.4.9 - name: ensure-cuetsified -- commands: - - ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} - --no-pull-enterprise v7.3.0-test - depends_on: - - initialize - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/build-container:1.4.9 - name: build-backend-enterprise2 -- commands: - - ./bin/grabpl package --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} - --no-pull-enterprise --sign v7.3.0-test - depends_on: - - build-plugins - - build-backend - - build-frontend - - build-backend-enterprise2 - environment: - GITHUB_TOKEN: - from_secret: github_token - GPG_KEY_PASSWORD: - from_secret: gpg_key_password - GPG_PRIV_KEY: - from_secret: gpg_priv_key - GPG_PUB_KEY: - from_secret: gpg_pub_key - GRAFANA_API_KEY: - from_secret: grafana_api_key - image: grafana/build-container:1.4.9 - name: package -- commands: - - ls dist/*.tar.gz* - - cp dist/*.tar.gz* packaging/docker/ - depends_on: - - package - image: grafana/build-container:1.4.9 - name: copy-packages-for-docker -- commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - - ./bin/grabpl build-docker --edition enterprise --shouldSave - depends_on: - - copy-packages-for-docker - environment: - GCP_KEY: - from_secret: gcp_key - image: google/cloud-sdk - name: package-docker-images - volumes: - - name: docker - path: /var/run/docker.sock -- commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey.json - - ./bin/grabpl build-docker --edition enterprise --shouldSave --ubuntu - depends_on: - - copy-packages-for-docker - environment: - GCP_KEY: - from_secret: gcp_key - image: google/cloud-sdk - name: package-docker-images-ubuntu - volumes: - - name: docker - path: /var/run/docker.sock -- commands: - - ./e2e/start-server - depends_on: - - package - detach: true - environment: - PACKAGE_FILE: dist/grafana-enterprise-*linux-amd64.tar.gz - PORT: 3001 - RUNDIR: e2e/tmp-grafana-enterprise - image: grafana/build-container:1.4.9 - name: end-to-end-tests-server -- commands: - - apt-get install -y netcat - - ./bin/grabpl e2e-tests --port 3001 --suite dashboards-suite --tries 3 - depends_on: - - package - environment: - HOST: end-to-end-tests-server - image: cypress/included:9.2.0 - name: end-to-end-tests-dashboards-suite -- commands: - - apt-get install -y netcat - - ./bin/grabpl e2e-tests --port 3001 --suite smoke-tests-suite --tries 3 - depends_on: - - package - environment: - HOST: end-to-end-tests-server - image: cypress/included:9.2.0 - name: end-to-end-tests-smoke-tests-suite -- commands: - - apt-get install -y netcat - - ./bin/grabpl e2e-tests --port 3001 --suite panels-suite --tries 3 - depends_on: - - package - environment: - HOST: end-to-end-tests-server - image: cypress/included:9.2.0 - name: end-to-end-tests-panels-suite -- commands: - - apt-get install -y netcat - - ./bin/grabpl e2e-tests --port 3001 --suite various-suite --tries 3 - depends_on: - - package - environment: - HOST: end-to-end-tests-server - image: cypress/included:9.2.0 - name: end-to-end-tests-various-suite -- commands: - - apt-get update - - apt-get install -yq zip - - ls -lah ./e2e - - find ./e2e -type f -name "*.mp4" - - printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json - - gcloud auth activate-service-account --key-file=/tmp/gcpkey_upload_artifacts.json - - find ./e2e -type f -name "*spec.ts.mp4" | zip e2e/videos.zip -@ - - gsutil cp e2e/videos.zip gs://$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip - - export E2E_ARTIFACTS_VIDEO_ZIP=https://storage.googleapis.com/$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip - - 'echo "E2E Test artifacts uploaded to: $${E2E_ARTIFACTS_VIDEO_ZIP}"' - - 'curl -X POST https://api.github.com/repos/${DRONE_REPO}/statuses/${DRONE_COMMIT_SHA} - -H "Authorization: token $${GITHUB_TOKEN}" -d "{\"state\":\"success\",\"target_url\":\"$${E2E_ARTIFACTS_VIDEO_ZIP}\", - \"description\": \"Click on the details to download e2e recording videos\", \"context\": - \"e2e_artifacts\"}"' - depends_on: - - end-to-end-tests-dashboards-suite - - end-to-end-tests-panels-suite - - end-to-end-tests-smoke-tests-suite - - end-to-end-tests-various-suite - environment: - E2E_TEST_ARTIFACTS_BUCKET: releng-pipeline-artifacts-dev - GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY: - from_secret: gcp_upload_artifacts_key - GITHUB_TOKEN: - from_secret: github_token - image: google/cloud-sdk:367.0.0 - name: e2e-tests-artifacts-upload - when: - status: - - success - - failure -- commands: - - ./bin/grabpl upload-cdn --edition enterprise --bucket "grafana-static-assets" - depends_on: - - package - environment: - GCP_GRAFANA_UPLOAD_KEY: - from_secret: gcp_key - PRERELEASE_BUCKET: - from_secret: prerelease_bucket - image: grafana/grafana-ci-deploy:1.3.1 - name: upload-cdn-assets -- commands: - - ./bin/grabpl upload-packages --edition enterprise --packages-bucket grafana-downloads-test - depends_on: - - package - environment: - GCP_GRAFANA_UPLOAD_KEY: - from_secret: gcp_key - PRERELEASE_BUCKET: - from_secret: prerelease_bucket - image: grafana/grafana-ci-deploy:1.3.1 - name: upload-packages -- commands: - - ./bin/grabpl package --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} - --no-pull-enterprise --sign v7.3.0-test - depends_on: - - build-plugins - - build-backend - - build-frontend - - build-backend-enterprise2 - environment: - GITHUB_TOKEN: - from_secret: github_token - GPG_KEY_PASSWORD: - from_secret: gpg_key_password - GPG_PRIV_KEY: - from_secret: gpg_priv_key - GPG_PUB_KEY: - from_secret: gpg_pub_key - GRAFANA_API_KEY: - from_secret: grafana_api_key - image: grafana/build-container:1.4.9 - name: package-enterprise2 -- commands: - - ./bin/grabpl upload-cdn --edition enterprise2 --bucket "grafana-static-assets" - depends_on: - - package-enterprise2 - environment: - GCP_GRAFANA_UPLOAD_KEY: - from_secret: gcp_key - PRERELEASE_BUCKET: - from_secret: prerelease_bucket - image: grafana/grafana-ci-deploy:1.3.1 - name: upload-cdn-assets-enterprise2 -- commands: - - ./bin/grabpl upload-packages --edition enterprise2 --packages-bucket grafana-downloads-test - depends_on: - - package-enterprise2 - environment: - GCP_GRAFANA_UPLOAD_KEY: - from_secret: gcp_key - PRERELEASE_BUCKET: - from_secret: prerelease_bucket - image: grafana/grafana-ci-deploy:1.3.1 - name: upload-packages-enterprise2 -trigger: - event: - - custom -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker -- name: postgres - temp: - medium: memory -- name: mysql - temp: - medium: memory ---- -clone: - disable: true -depends_on: [] -image_pull_secrets: -- dockerconfigjson -kind: pipeline -name: enterprise-test-test-release -node: - type: no-parallel -platform: - arch: amd64 - os: linux -services: [] -steps: -- commands: - - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl - - chmod +x bin/grabpl - image: byrnedo/alpine-curl:0.1.8 - name: grabpl -- commands: - - echo $DRONE_RUNNER_NAME - image: alpine:3.15 - name: identify-runner -- commands: - - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - - cd grafana-enterprise - - git checkout main - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/build-container:1.4.9 - name: clone-enterprise -- commands: - - mv bin/grabpl /tmp/ - - rmdir bin - - mv grafana-enterprise /tmp/ - - /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise - - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json - - mkdir bin - - mv /tmp/grabpl bin/ - - make gen-go - - ./bin/grabpl verify-version v7.3.0-test - - ./bin/grabpl gen-version v7.3.0-test - - yarn install --immutable - depends_on: - - clone-enterprise - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/build-container:1.4.9 - name: initialize -- commands: - - |- - echo -e "unknwon - referer - errorstring - eror - iam - wan" > words_to_ignore.txt - - codespell -I words_to_ignore.txt docs/ - - rm words_to_ignore.txt - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: codespell -- commands: - - ./bin/grabpl shellcheck - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: shellcheck -- commands: - - ./bin/grabpl lint-backend --edition enterprise - depends_on: - - initialize - environment: - CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 - name: lint-backend -- commands: - - yarn run prettier:check - - yarn run lint - - yarn run i18n:compile - - yarn run typecheck - depends_on: - - initialize - environment: - TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 - name: lint-frontend -- commands: - - ./bin/grabpl test-backend --edition enterprise - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: test-backend -- commands: - - ./bin/grabpl integration-tests --edition enterprise - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: test-backend-integration -- commands: - - yarn run ci:test-frontend - depends_on: - - initialize - environment: - TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 - name: test-frontend -- commands: - - ./bin/grabpl lint-backend --edition enterprise2 - depends_on: - - initialize - environment: - CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 - name: lint-backend-enterprise2 -- commands: - - ./bin/grabpl test-backend --edition enterprise2 - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: test-backend-enterprise2 -- commands: - - ./bin/grabpl integration-tests --edition enterprise2 - depends_on: - - initialize - image: grafana/build-container:1.4.9 - name: test-backend-integration-enterprise2 -trigger: - event: - - custom -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker ---- -clone: - disable: true -depends_on: [] -image_pull_secrets: -- dockerconfigjson -kind: pipeline -name: enterprise-integration-tests-test-release -node: - type: no-parallel -platform: - arch: amd64 - os: linux -services: -- environment: - PGDATA: /var/lib/postgresql/data/pgdata - POSTGRES_DB: grafanatest - POSTGRES_PASSWORD: grafanatest - POSTGRES_USER: grafanatest - image: postgres:12.3-alpine - name: postgres - volumes: - - name: postgres - path: /var/lib/postgresql/data/pgdata -- environment: - MYSQL_DATABASE: grafana_tests - MYSQL_PASSWORD: password - MYSQL_ROOT_PASSWORD: rootpass - MYSQL_USER: grafana - image: mysql:5.6.48 - name: mysql - volumes: - - name: mysql - path: /var/lib/mysql -- environment: {} - image: redis:6.2.1-alpine - name: redis -- environment: {} - image: memcached:1.6.9-alpine - name: memcached -steps: -- commands: - - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl - - chmod +x bin/grabpl - image: byrnedo/alpine-curl:0.1.8 - name: grabpl -- commands: - - echo $DRONE_RUNNER_NAME - image: alpine:3.15 - name: identify-runner -- commands: - - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - - cd grafana-enterprise - - git checkout main - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/build-container:1.4.9 - name: clone-enterprise -- commands: - - mv bin/grabpl /tmp/ - - rmdir bin - - mv grafana-enterprise /tmp/ - - /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise - - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json - - mkdir bin - - mv /tmp/grabpl bin/ - - make gen-go - - ./bin/grabpl verify-version v7.3.0-test - - ./bin/grabpl gen-version v7.3.0-test - - yarn install --immutable - depends_on: - - clone-enterprise - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/build-container:1.4.9 - name: initialize -- commands: - - apt-get update - - apt-get install -yq postgresql-client - - dockerize -wait tcp://postgres:5432 -timeout 120s - - psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql - - go clean -testcache - - ./bin/grabpl integration-tests --database postgres - depends_on: - - grabpl - environment: - GRAFANA_TEST_DB: postgres - PGPASSWORD: grafanatest - POSTGRES_HOST: postgres - image: grafana/build-container:1.4.9 - name: postgres-integration-tests -- commands: - - apt-get update - - apt-get install -yq default-mysql-client - - dockerize -wait tcp://mysql:3306 -timeout 120s - - cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root - -prootpass - - go clean -testcache - - ./bin/grabpl integration-tests --database mysql - depends_on: - - grabpl - environment: - GRAFANA_TEST_DB: mysql - MYSQL_HOST: mysql - image: grafana/build-container:1.4.9 - name: mysql-integration-tests -- commands: - - dockerize -wait tcp://redis:6379/0 -timeout 120s - - ./bin/grabpl integration-tests - depends_on: - - grabpl - environment: - REDIS_URL: redis://redis:6379/0 - image: grafana/build-container:1.4.9 - name: redis-integration-tests -- commands: - - dockerize -wait tcp://memcached:11211 -timeout 120s - - ./bin/grabpl integration-tests - depends_on: - - grabpl - environment: - MEMCACHED_HOSTS: memcached:11211 - image: grafana/build-container:1.4.9 - name: memcached-integration-tests -trigger: - event: - - custom -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker -- name: postgres - temp: - medium: memory -- name: mysql - temp: - medium: memory ---- -clone: - disable: true -depends_on: -- enterprise-build-e2e-publish-test-release -- enterprise-test-test-release -- enterprise-integration-tests-test-release -image_pull_secrets: -- dockerconfigjson -kind: pipeline -name: enterprise-windows-test-release -platform: - arch: amd64 - os: windows - version: "1809" -services: [] -steps: -- commands: - - echo $env:DRONE_RUNNER_NAME - image: mcr.microsoft.com/windows:1809 - name: identify-runner -- commands: - - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/windows/grabpl.exe - -OutFile grabpl.exe - - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - - cd grafana-enterprise - - git checkout main - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/ci-wix:0.1.1 - name: clone -- commands: - - cp -r grafana-enterprise C:\App\grafana-enterprise - - rm -r -force grafana-enterprise - - cp grabpl.exe C:\App\grabpl.exe - - rm -force grabpl.exe - - C:\App\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\App\grafana-enterprise - - cp C:\App\grabpl.exe grabpl.exe - depends_on: - - clone - environment: - GITHUB_TOKEN: - from_secret: github_token - image: grafana/ci-wix:0.1.1 - name: initialize -- commands: - - $$gcpKey = $$env:GCP_KEY - - '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey)) - > gcpkey.json' - - dos2unix gcpkey.json - - gcloud auth activate-service-account --key-file=gcpkey.json - - rm gcpkey.json - - cp C:\App\nssm-2.24.zip . - - .\grabpl.exe gen-version v7.3.0-test - - .\grabpl.exe windows-installer --edition enterprise --packages-bucket grafana-downloads-test - v7.3.0-test - - $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0] - - gsutil cp $$fname gs://grafana-downloads-test/v7.3.0-test/enterprise/release/ - - gsutil cp "$$fname.sha256" gs://grafana-downloads-test/v7.3.0-test/enterprise/release/ - depends_on: - - initialize - environment: - GCP_KEY: - from_secret: gcp_key - GITHUB_TOKEN: - from_secret: github_token - PRERELEASE_BUCKET: - from_secret: prerelease_bucket - image: grafana/ci-wix:0.1.1 - name: build-windows-installer -trigger: - event: - - custom -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker ---- -depends_on: -- oss-build-publish-e2e-test-release -- oss-test-test-release -- oss-integration-tests-test-release -- oss-windows-test-release -- enterprise-build-e2e-publish-test-release -- enterprise-test-test-release -- enterprise-integration-tests-test-release -- enterprise-windows-test-release -kind: pipeline -name: publish-test-release -node: - type: no-parallel -platform: - arch: amd64 - os: linux -services: [] -steps: -- commands: - - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.8.4/grabpl - - chmod +x bin/grabpl - image: byrnedo/alpine-curl:0.1.8 - name: grabpl -- commands: - - echo $DRONE_RUNNER_NAME - image: alpine:3.15 - name: identify-runner -- commands: - - make gen-go - - ./bin/grabpl verify-version v7.3.0-test - image: grafana/build-container:1.4.9 - name: initialize -- commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - ./bin/grabpl store-packages --edition oss --gcp-key /tmp/gcpkey.json --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 - v7.3.0-test - depends_on: - - grabpl - environment: - GCP_KEY: - from_secret: gcp_key - GPG_KEY_PASSWORD: - from_secret: gpg_key_password - GPG_PRIV_KEY: - from_secret: gpg_priv_key - GPG_PUB_KEY: - from_secret: gpg_pub_key - GRAFANA_COM_API_KEY: - from_secret: grafana_api_key - image: grafana/grafana-ci-deploy:1.3.1 - name: store-packages-oss -- commands: - - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json - - ./bin/grabpl store-packages --edition enterprise --gcp-key /tmp/gcpkey.json --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 - v7.3.0-test - depends_on: - - grabpl - environment: - GCP_KEY: - from_secret: gcp_key - GPG_KEY_PASSWORD: - from_secret: gpg_key_password - GPG_PRIV_KEY: - from_secret: gpg_priv_key - GPG_PUB_KEY: - from_secret: gpg_pub_key - GRAFANA_COM_API_KEY: - from_secret: grafana_api_key - image: grafana/grafana-ci-deploy:1.3.1 - name: store-packages-enterprise -trigger: - event: - - custom -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker ---- -depends_on: -- oss-build-publish-e2e-test-release -- oss-test-test-release -- oss-integration-tests-test-release -- oss-windows-test-release -- enterprise-build-e2e-publish-test-release -- enterprise-test-test-release -- enterprise-integration-tests-test-release -- enterprise-windows-test-release -- publish-test-release -kind: pipeline -name: notify-test-release -platform: - arch: amd64 - os: linux -steps: -- image: plugins/slack - name: slack - settings: - channel: grafana-ci-notifications - template: |- - Build {{build.number}} failed for commit: : {{build.link}} - Branch: - Author: {{build.author}} - webhook: - from_secret: slack_webhook -trigger: - event: - - custom - status: - - failure -type: docker ---- -depends_on: [] -kind: pipeline name: oss-build-publish-e2e-release-branch node: type: no-parallel @@ -5507,6 +4175,6 @@ kind: secret name: gcp_upload_artifacts_key --- kind: signature -hmac: 01bbd575b573f01011e7e7b291f1b23c57542b942a8214f3292f9093a829e4c3 +hmac: 00de7a9339c4f19716c6edb0ad6578aaff95e5850cc7c1035d1cdf71c80af283 ... diff --git a/scripts/drone/pipelines/release.star b/scripts/drone/pipelines/release.star index 5e82b39a68c..1c0b967f317 100644 --- a/scripts/drone/pipelines/release.star +++ b/scripts/drone/pipelines/release.star @@ -181,7 +181,7 @@ def publish_image_pipelines(mode): def get_steps(edition, ver_mode): package_steps = [] publish_steps = [] - should_publish = ver_mode in ('release', 'test-release',) + should_publish = ver_mode == 'release' should_upload = should_publish or ver_mode in ('release-branch',) include_enterprise2 = edition == 'enterprise' edition2 = 'enterprise2' @@ -451,7 +451,7 @@ def release_pipelines(ver_mode='release', trigger=None, environment=None): }, } - should_publish = ver_mode in ('release', 'test-release',) + should_publish = ver_mode == 'release' # The release pipelines include also enterprise ones, so both editions are built for a release. # We could also solve this by triggering a downstream build for the enterprise repo, but by including enterprise @@ -470,39 +470,6 @@ def release_pipelines(ver_mode='release', trigger=None, environment=None): return pipelines -def test_release_pipelines(): - ver_mode = 'test-release' - - services = integration_test_services(edition='enterprise') - trigger = { - 'event': ['custom',], - } - - oss_pipelines = get_oss_pipelines(ver_mode=ver_mode, trigger=trigger) - enterprise_pipelines = get_enterprise_pipelines(ver_mode=ver_mode, trigger=trigger) - - publish_cmd = './bin/grabpl store-packages --edition {{}} --dry-run {}'.format(test_release_ver) - - steps = [ - store_packages_step(edition='oss', ver_mode=ver_mode), - store_packages_step(edition='enterprise', ver_mode=ver_mode), - ] - - publish_pipeline = pipeline( - name='publish-{}'.format(ver_mode), trigger=trigger, edition='oss', - steps=[download_grabpl_step()] + initialize_step(edition='oss', platform='linux', ver_mode=ver_mode, install_deps=False) + steps, - depends_on=[p['name'] for p in oss_pipelines + enterprise_pipelines], - ) - - pipelines = oss_pipelines + enterprise_pipelines + [publish_pipeline,] - - pipelines.append(notify_pipeline( - name='notify-{}'.format(ver_mode), slack_channel='grafana-ci-notifications', trigger=dict(trigger, status = ['failure']), - depends_on=[p['name'] for p in pipelines], template=failure_template, secret='slack_webhook', - )) - - return pipelines - def get_e2e_suffix(): if not disable_tests: return '-e2e' diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index 4777ed28835..f25e7b0930d 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -46,9 +46,6 @@ def initialize_step(edition, platform, ver_mode, is_downstream=False, install_de if ver_mode == 'release': args = '${DRONE_TAG}' common_cmds.append('./bin/grabpl verify-version ${DRONE_TAG}') - elif ver_mode == 'test-release': - args = test_release_ver - common_cmds.append('./bin/grabpl verify-version {}'.format(test_release_ver)) else: if not is_downstream: build_no = '${DRONE_BUILD_NUMBER}' @@ -68,8 +65,6 @@ def initialize_step(edition, platform, ver_mode, is_downstream=False, install_de if ver_mode == 'release': committish = '${DRONE_TAG}' source_commit = ' ${DRONE_TAG}' - elif ver_mode == 'test-release': - committish = 'main' elif ver_mode == 'release-branch': committish = '${DRONE_BRANCH}' else: @@ -232,7 +227,7 @@ def benchmark_ldap_step(): def build_storybook_step(edition, ver_mode): - if edition in ('enterprise', 'enterprise2') and ver_mode in ('release', 'test-release'): + if edition in ('enterprise', 'enterprise2') and ver_mode == 'release': return None return { @@ -256,24 +251,20 @@ def store_storybook_step(edition, ver_mode): if edition in ('enterprise', 'enterprise2'): return None - if ver_mode == 'test-release': - commands = [ - 'echo Testing release', - ] + + commands = [] + if ver_mode == 'release': + channels = ['latest', '${DRONE_TAG}', ] else: - commands = [] - if ver_mode == 'release': - channels = ['latest', '${DRONE_TAG}', ] - else: - channels = ['canary', ] - commands.extend([ - 'printenv GCP_KEY | base64 -d > /tmp/gcpkey.json', - 'gcloud auth activate-service-account --key-file=/tmp/gcpkey.json', - ] + [ - 'gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://$${{PRERELEASE_BUCKET}}/artifacts/storybook/{}'.format( - c) - for c in channels - ]) + channels = ['canary', ] + commands.extend([ + 'printenv GCP_KEY | base64 -d > /tmp/gcpkey.json', + 'gcloud auth activate-service-account --key-file=/tmp/gcpkey.json', + ] + [ + 'gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://$${{PRERELEASE_BUCKET}}/artifacts/storybook/{}'.format( + c) + for c in channels + ]) return { 'name': 'store-storybook', @@ -370,15 +361,6 @@ def build_backend_step(edition, ver_mode, variants=None, is_downstream=False): edition, ), ] - elif ver_mode == 'test-release': - env = { - 'GITHUB_TOKEN': from_secret(github_token), - } - cmds = [ - './bin/grabpl build-backend --jobs 8 --edition {} --github-token $${{GITHUB_TOKEN}} --no-pull-enterprise {}'.format( - edition, test_release_ver, - ), - ] else: if not is_downstream: build_no = '${DRONE_BUILD_NUMBER}' @@ -414,11 +396,6 @@ def build_frontend_step(edition, ver_mode, is_downstream=False): './bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps ' + \ '--edition {} --no-pull-enterprise ${{DRONE_TAG}}'.format(edition), ] - elif ver_mode == 'test-release': - cmds = [ - './bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps ' + \ - '--edition {} --no-pull-enterprise {}'.format(edition, test_release_ver), - ] else: cmds = [ './bin/grabpl build-frontend --jobs 8 --no-install-deps --edition {} '.format(edition) + \ @@ -631,7 +608,7 @@ def package_step(edition, ver_mode, include_enterprise2=False, variants=None, is if variants: variants_str = ' --variants {}'.format(','.join(variants)) - if ver_mode in ('main', 'release', 'test-release', 'release-branch'): + if ver_mode in ('main', 'release', 'release-branch'): sign_args = ' --sign' env = { 'GRAFANA_API_KEY': from_secret('grafana_api_key'), @@ -654,13 +631,6 @@ def package_step(edition, ver_mode, include_enterprise2=False, variants=None, is sign_args ), ] - elif ver_mode == 'test-release': - cmds = [ - '{}./bin/grabpl package --jobs 8 --edition {} '.format(test_args, edition) + \ - '--github-token $${{GITHUB_TOKEN}} --no-pull-enterprise{} {}'.format( - sign_args, test_release_ver, - ), - ] else: if not is_downstream: build_no = '${DRONE_BUILD_NUMBER}' @@ -758,9 +728,6 @@ def copy_packages_for_docker_step(): def package_docker_images_step(edition, ver_mode, archs=None, ubuntu=False, publish=False): - if ver_mode == 'test-release': - publish = False - cmd = './bin/grabpl build-docker --edition {} --shouldSave'.format(edition) ubuntu_sfx = '' if ubuntu: @@ -789,9 +756,6 @@ def package_docker_images_step(edition, ver_mode, archs=None, ubuntu=False, publ } def build_docker_images_step(edition, ver_mode, archs=None, ubuntu=False, publish=False): - if ver_mode == 'test-release': - publish = False - ubuntu_sfx = '' if ubuntu: ubuntu_sfx = '-ubuntu' @@ -936,10 +900,7 @@ def upload_packages_step(edition, ver_mode, is_downstream=False): if ver_mode == 'main' and edition in ('enterprise', 'enterprise2') and not is_downstream: return None - if ver_mode == 'test-release': - cmd = './bin/grabpl upload-packages --edition {} '.format(edition) + \ - '--packages-bucket grafana-downloads-test' - elif ver_mode == 'release': + if ver_mode == 'release': packages_bucket = '$${{PRERELEASE_BUCKET}}/artifacts/downloads{}'.format(enterprise2_suffix(edition)) cmd = './bin/grabpl upload-packages --edition {} --packages-bucket {}'.format(edition, packages_bucket) elif edition == 'enterprise2': @@ -968,13 +929,7 @@ def upload_packages_step(edition, ver_mode, is_downstream=False): def store_packages_step(edition, ver_mode, is_downstream=False): - if ver_mode == 'test-release': - cmd = './bin/grabpl store-packages --edition {} --gcp-key /tmp/gcpkey.json '.format(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 {}'.format( - test_release_ver, - ) - elif ver_mode == 'release': + if ver_mode == 'release': cmd = './bin/grabpl store-packages --edition {} --packages-bucket grafana-downloads --gcp-key /tmp/gcpkey.json ${{DRONE_TAG}}'.format( edition, ) @@ -1033,18 +988,13 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): }, ] if (ver_mode == 'main' and (edition not in ('enterprise', 'enterprise2') or is_downstream)) or ver_mode in ( - 'release', 'test-release', 'release-branch', + 'release', 'release-branch', ): bucket_part = '' bucket = '%PRERELEASE_BUCKET%/artifacts/downloads' if ver_mode == 'release': ver_part = '${DRONE_TAG}' dir = 'release' - elif ver_mode == 'test-release': - ver_part = test_release_ver - dir = 'release' - bucket = 'grafana-downloads-test' - bucket_part = ' --packages-bucket {}'.format(bucket) else: dir = 'main' bucket = 'grafana-downloads' @@ -1064,7 +1014,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): 'cp C:\\App\\nssm-2.24.zip .', ] if (ver_mode == 'main' and (edition not in ('enterprise', 'enterprise2') or is_downstream)) or ver_mode in ( - 'release', 'test-release', + 'release', ): installer_commands.extend([ '.\\grabpl.exe gen-version {}'.format(ver_part), @@ -1098,8 +1048,6 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): if edition in ('enterprise', 'enterprise2'): if ver_mode == 'release': committish = '${DRONE_TAG}' - elif ver_mode == 'test-release': - committish = 'main' elif ver_mode == 'release-branch': committish = '$$env:DRONE_BRANCH' else: