From 0cf8f9fab6642b62e88946d781fb2a18237b29cb Mon Sep 17 00:00:00 2001 From: Dimitris Sotirakis Date: Wed, 12 Oct 2022 09:44:12 +0300 Subject: [PATCH] [v9.2.x] CI: Split release test pipelines (#56670) * CI: Split release test pipelines (#56655) * Split test release pipelines * Add missing dependencies * Add release branch case when naming pipeline (cherry picked from commit 75c58457493527549bb292beb258c9b1cbdd7fb2) * Add clone-enterprise and init-enterprise steps (#56662) (cherry picked from commit eb077db2b0dea3be802a36a602af9da35828e718) * Add dependencies (#56666) (cherry picked from commit 811f6054c81eda6725309b5fe2db4548b9b2e065) * Fix release test pipelines dependencies (#56671) (cherry picked from commit 668cb25b82e357950cb3dbe22f0e8e9ba0426cdc) * Remove build-frontend-packages step from docs pipelines (#56686) (cherry picked from commit efc8f985cba3c39f6ed25c0a7e8a4188f0cad96a) * Remove grabpl dependency from yarn-install (#56692) * Sign drone --- .drone.yml | 947 +++++++++++++-------- scripts/drone/events/release.star | 61 +- scripts/drone/pipelines/docs.star | 4 - scripts/drone/pipelines/test_backend.star | 26 +- scripts/drone/pipelines/test_frontend.star | 25 +- scripts/drone/steps/lib.star | 35 +- 6 files changed, 681 insertions(+), 417 deletions(-) diff --git a/.drone.yml b/.drone.yml index deabfe83d14..d7c078997d1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -79,17 +79,9 @@ steps: name: grabpl - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install -- commands: - - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd - depends_on: [] - environment: - CGO_ENABLED: 0 - image: golang:1.19.2 - name: compile-build-cmd - commands: - yarn betterer ci depends_on: @@ -178,6 +170,8 @@ volumes: clone: retries: 3 depends_on: [] +environment: + EDITION: oss image_pull_secrets: - dockerconfigjson kind: pipeline @@ -357,8 +351,7 @@ steps: name: wire-install - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install - failure: ignore @@ -393,6 +386,7 @@ steps: - commands: - ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} depends_on: + - compile-build-cmd - yarn-install environment: NODE_OPTIONS: --max_old_space_size=8192 @@ -401,6 +395,7 @@ steps: - commands: - ./bin/build build-plugins --jobs 8 --edition oss depends_on: + - compile-build-cmd - yarn-install environment: null image: grafana/build-container:1.6.3 @@ -709,8 +704,7 @@ steps: name: identify-runner - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install - commands: @@ -733,27 +727,12 @@ steps: NODE_OPTIONS: --max_old_space_size=8192 image: grafana/build-container:1.6.3 name: lint-docs -- commands: - - ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} - depends_on: - - yarn-install - environment: - NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.6.3 - name: build-frontend-packages - commands: - mkdir -p /hugo/content/docs/grafana - cp -r docs/sources/* /hugo/content/docs/grafana/latest/ - cd /hugo && make prod image: grafana/docs-base:latest name: build-docs-website -- commands: - - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd - depends_on: [] - environment: - CGO_ENABLED: 0 - image: golang:1.19.2 - name: compile-build-cmd trigger: event: - pull_request @@ -838,8 +817,7 @@ steps: name: identify-runner - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install - commands: @@ -862,27 +840,12 @@ steps: NODE_OPTIONS: --max_old_space_size=8192 image: grafana/build-container:1.6.3 name: lint-docs -- commands: - - ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} - depends_on: - - yarn-install - environment: - NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.6.3 - name: build-frontend-packages - commands: - mkdir -p /hugo/content/docs/grafana - cp -r docs/sources/* /hugo/content/docs/grafana/latest/ - cd /hugo && make prod image: grafana/docs-base:latest name: build-docs-website -- commands: - - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd - depends_on: [] - environment: - CGO_ENABLED: 0 - image: golang:1.19.2 - name: compile-build-cmd trigger: branch: main event: @@ -925,17 +888,9 @@ steps: name: grabpl - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install -- commands: - - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd - depends_on: [] - environment: - CGO_ENABLED: 0 - image: golang:1.19.2 - name: compile-build-cmd - commands: - yarn betterer ci depends_on: @@ -1018,6 +973,8 @@ volumes: clone: retries: 3 depends_on: [] +environment: + EDITION: oss image_pull_secrets: - dockerconfigjson kind: pipeline @@ -1190,8 +1147,7 @@ steps: name: wire-install - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install - commands: @@ -1241,6 +1197,7 @@ steps: - commands: - ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} depends_on: + - compile-build-cmd - yarn-install environment: NODE_OPTIONS: --max_old_space_size=8192 @@ -1249,6 +1206,7 @@ steps: - commands: - ./bin/build build-plugins --jobs 8 --edition oss depends_on: + - compile-build-cmd - yarn-install environment: GRAFANA_API_KEY: @@ -1923,7 +1881,7 @@ clone: retries: 3 depends_on: [] environment: - EDITION: OSS + EDITION: oss image_pull_secrets: - dockerconfigjson kind: pipeline @@ -1962,8 +1920,7 @@ steps: name: wire-install - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install - commands: @@ -1992,6 +1949,7 @@ steps: - commands: - ./bin/build build-frontend-packages --jobs 8 --edition oss ${DRONE_TAG} depends_on: + - compile-build-cmd - yarn-install environment: NODE_OPTIONS: --max_old_space_size=8192 @@ -2000,6 +1958,7 @@ steps: - commands: - ./bin/build build-plugins --jobs 8 --edition oss depends_on: + - compile-build-cmd - yarn-install environment: GRAFANA_API_KEY: @@ -2232,12 +2191,10 @@ volumes: clone: retries: 3 depends_on: [] -environment: - EDITION: OSS image_pull_secrets: - dockerconfigjson kind: pipeline -name: release-oss-test +name: release-oss-test-frontend node: type: no-parallel platform: @@ -2255,66 +2212,18 @@ steps: - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl -- commands: - - '# It is required that code generated from Thema/CUE be committed and in sync - with its inputs.' - - '# The following command will fail if running code generators produces any diff - in output.' - - CODEGEN_VERIFY=1 make gen-cue - depends_on: [] - image: grafana/build-container:1.6.3 - name: verify-gen-cue -- commands: - - make gen-go - depends_on: - - verify-gen-cue - image: grafana/build-container:1.6.3 - name: wire-install - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install - commands: - - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd - depends_on: [] - environment: - CGO_ENABLED: 0 - image: golang:1.19.2 - name: compile-build-cmd -- commands: - - apt-get update && apt-get install make - - make lint-go - depends_on: - - wire-install - environment: - CGO_ENABLED: "1" - image: golang:1.19.2 - name: lint-backend -- commands: - - yarn run prettier:check - - yarn run lint - - yarn run i18n:compile - - yarn run typecheck + - yarn betterer ci depends_on: - yarn-install - environment: - TEST_MAX_WORKERS: 50% + failure: ignore image: grafana/build-container:1.6.3 - name: lint-frontend -- commands: - - go test -short -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend -- commands: - - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend-integration + name: betterer-frontend - commands: - yarn run ci:test-frontend depends_on: @@ -2342,7 +2251,76 @@ clone: retries: 3 depends_on: [] environment: - EDITION: OSS + EDITION: oss +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: release-oss-test-backend +node: + type: no-parallel +platform: + arch: amd64 + os: linux +services: [] +steps: +- commands: + - echo $DRONE_RUNNER_NAME + image: alpine:3.15.6 + name: identify-runner +- commands: + - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd + depends_on: [] + environment: + CGO_ENABLED: 0 + image: golang:1.19.2 + name: compile-build-cmd +- commands: + - '# It is required that code generated from Thema/CUE be committed and in sync + with its inputs.' + - '# The following command will fail if running code generators produces any diff + in output.' + - CODEGEN_VERIFY=1 make gen-cue + depends_on: [] + image: grafana/build-container:1.6.3 + name: verify-gen-cue +- commands: + - make gen-go + depends_on: + - verify-gen-cue + image: grafana/build-container:1.6.3 + name: wire-install +- commands: + - go test -short -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend +- commands: + - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend-integration +trigger: + event: + exclude: + - promote + ref: + - refs/tags/v* + repo: + exclude: + - grafana/grafana +type: docker +volumes: +- host: + path: /var/run/docker.sock + name: docker +--- +clone: + retries: 3 +depends_on: [] +environment: + EDITION: oss image_pull_secrets: - dockerconfigjson kind: pipeline @@ -2456,10 +2434,11 @@ clone: retries: 3 depends_on: - release-oss-build-e2e-publish -- release-oss-test +- release-oss-test-frontend +- release-oss-test-backend - release-oss-integration-tests environment: - EDITION: OSS + EDITION: oss image_pull_secrets: - dockerconfigjson kind: pipeline @@ -2522,7 +2501,7 @@ clone: disable: true depends_on: [] environment: - EDITION: ENTERPRISE + EDITION: enterprise image_pull_secrets: - dockerconfigjson kind: pipeline @@ -2618,6 +2597,7 @@ steps: - commands: - ./bin/build build-frontend-packages --jobs 8 --edition enterprise ${DRONE_TAG} depends_on: + - compile-build-cmd - yarn-install environment: NODE_OPTIONS: --max_old_space_size=8192 @@ -2626,6 +2606,7 @@ steps: - commands: - ./bin/build build-plugins --jobs 8 --edition enterprise depends_on: + - compile-build-cmd - yarn-install environment: GRAFANA_API_KEY: @@ -2871,12 +2852,10 @@ volumes: clone: disable: true depends_on: [] -environment: - EDITION: ENTERPRISE image_pull_secrets: - dockerconfigjson kind: pipeline -name: release-enterprise-test +name: release-enterprise-test-frontend node: type: no-parallel platform: @@ -2884,16 +2863,6 @@ platform: os: linux services: [] steps: -- commands: - - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.10/grabpl - - chmod +x bin/grabpl - image: byrnedo/alpine-curl:0.1.8 - name: grabpl -- commands: - - echo $DRONE_RUNNER_NAME - image: alpine:3.15.6 - name: identify-runner - commands: - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -2920,19 +2889,15 @@ steps: image: grafana/build-container:1.6.3 name: init-enterprise - commands: - - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd - depends_on: - - init-enterprise - environment: - CGO_ENABLED: 0 - image: golang:1.19.2 - name: compile-build-cmd + - echo $DRONE_RUNNER_NAME + image: alpine:3.15.6 + name: identify-runner - commands: - - make gen-go - depends_on: - - init-enterprise - image: grafana/build-container:1.6.3 - name: wire-install + - mkdir -p bin + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.10/grabpl + - chmod +x bin/grabpl + image: byrnedo/alpine-curl:0.1.8 + name: grabpl - commands: - yarn install --immutable depends_on: @@ -2940,70 +2905,22 @@ steps: image: grafana/build-container:1.6.3 name: yarn-install - commands: - - '# It is required that code generated from Thema/CUE be committed and in sync - with its inputs.' - - '# The following command will fail if running code generators produces any diff - in output.' - - CODEGEN_VERIFY=1 make gen-cue + - yarn betterer ci depends_on: - init-enterprise - image: grafana/build-container:1.6.3 - name: verify-gen-cue -- commands: - - apt-get update && apt-get install make - - make lint-go - depends_on: - - wire-install - environment: - CGO_ENABLED: "1" - image: golang:1.19.2 - name: lint-backend -- commands: - - yarn run prettier:check - - yarn run lint - - yarn run i18n:compile - - yarn run typecheck - depends_on: - yarn-install - environment: - TEST_MAX_WORKERS: 50% + failure: ignore image: grafana/build-container:1.6.3 - name: lint-frontend -- commands: - - go test -short -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend -- commands: - - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend-integration + name: betterer-frontend - commands: - yarn run ci:test-frontend depends_on: + - init-enterprise - yarn-install environment: TEST_MAX_WORKERS: 50% image: grafana/build-container:1.6.3 name: test-frontend -- commands: - - apt-get update && apt-get install make - - make lint-go - depends_on: - - wire-install - environment: - CGO_ENABLED: "1" - image: golang:1.19.2 - name: lint-backend-enterprise2 -- commands: - - go test -tags=pro -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend-enterprise2 trigger: event: exclude: @@ -3023,7 +2940,211 @@ clone: disable: true depends_on: [] environment: - EDITION: ENTERPRISE + EDITION: enterprise +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: release-enterprise-test-backend +node: + type: no-parallel +platform: + arch: amd64 + os: linux +services: [] +steps: +- commands: + - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" + - cd grafana-enterprise + - git checkout ${DRONE_TAG} + environment: + GITHUB_TOKEN: + from_secret: github_token + image: grafana/build-container:1.6.3 + name: clone-enterprise +- commands: + - mkdir -p bin + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.10/grabpl + - chmod +x bin/grabpl + image: byrnedo/alpine-curl:0.1.8 + name: grabpl +- commands: + - mv bin/grabpl /tmp/ + - rmdir bin + - mv grafana-enterprise /tmp/ + - /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise + ${DRONE_TAG} + - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json + - mkdir bin + - mv /tmp/grabpl bin/ + depends_on: + - clone-enterprise + environment: + GITHUB_TOKEN: + from_secret: github_token + image: grafana/build-container:1.6.3 + name: init-enterprise +- commands: + - echo $DRONE_RUNNER_NAME + image: alpine:3.15.6 + name: identify-runner +- commands: + - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd + depends_on: + - init-enterprise + environment: + CGO_ENABLED: 0 + image: golang:1.19.2 + name: compile-build-cmd +- commands: + - '# It is required that code generated from Thema/CUE be committed and in sync + with its inputs.' + - '# The following command will fail if running code generators produces any diff + in output.' + - CODEGEN_VERIFY=1 make gen-cue + depends_on: + - init-enterprise + image: grafana/build-container:1.6.3 + name: verify-gen-cue +- commands: + - make gen-go + depends_on: + - verify-gen-cue + image: grafana/build-container:1.6.3 + name: wire-install +- commands: + - go test -short -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend +- commands: + - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend-integration +trigger: + event: + exclude: + - promote + ref: + - refs/tags/v* + repo: + exclude: + - grafana/grafana +type: docker +volumes: +- host: + path: /var/run/docker.sock + name: docker +--- +clone: + disable: true +depends_on: [] +environment: + EDITION: enterprise2 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: release-enterprise2-test-backend +node: + type: no-parallel +platform: + arch: amd64 + os: linux +services: [] +steps: +- commands: + - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" + - cd grafana-enterprise + - git checkout ${DRONE_TAG} + environment: + GITHUB_TOKEN: + from_secret: github_token + image: grafana/build-container:1.6.3 + name: clone-enterprise +- commands: + - mkdir -p bin + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.10/grabpl + - chmod +x bin/grabpl + image: byrnedo/alpine-curl:0.1.8 + name: grabpl +- commands: + - mv bin/grabpl /tmp/ + - rmdir bin + - mv grafana-enterprise /tmp/ + - /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise + ${DRONE_TAG} + - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json + - mkdir bin + - mv /tmp/grabpl bin/ + depends_on: + - clone-enterprise + environment: + GITHUB_TOKEN: + from_secret: github_token + image: grafana/build-container:1.6.3 + name: init-enterprise +- commands: + - echo $DRONE_RUNNER_NAME + image: alpine:3.15.6 + name: identify-runner +- commands: + - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd + depends_on: + - init-enterprise + environment: + CGO_ENABLED: 0 + image: golang:1.19.2 + name: compile-build-cmd +- commands: + - '# It is required that code generated from Thema/CUE be committed and in sync + with its inputs.' + - '# The following command will fail if running code generators produces any diff + in output.' + - CODEGEN_VERIFY=1 make gen-cue + depends_on: + - init-enterprise + image: grafana/build-container:1.6.3 + name: verify-gen-cue +- commands: + - make gen-go + depends_on: + - verify-gen-cue + image: grafana/build-container:1.6.3 + name: wire-install +- commands: + - go test -tags=pro -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend-enterprise2 +- commands: + - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend-integration +trigger: + event: + exclude: + - promote + ref: + - refs/tags/v* + repo: + exclude: + - grafana/grafana +type: docker +volumes: +- host: + path: /var/run/docker.sock + name: docker +--- +clone: + disable: true +depends_on: [] +environment: + EDITION: enterprise image_pull_secrets: - dockerconfigjson kind: pipeline @@ -3187,10 +3308,11 @@ clone: disable: true depends_on: - release-enterprise-build-e2e-publish -- release-enterprise-test +- release-enterprise-test-frontend +- release-enterprise-test-backend - release-enterprise-integration-tests environment: - EDITION: ENTERPRISE + EDITION: enterprise image_pull_secrets: - dockerconfigjson kind: pipeline @@ -3606,8 +3728,7 @@ steps: name: grabpl - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install - commands: @@ -3865,7 +3986,7 @@ clone: retries: 3 depends_on: [] environment: - EDITION: OSS + EDITION: oss image_pull_secrets: - dockerconfigjson kind: pipeline @@ -3904,8 +4025,7 @@ steps: name: wire-install - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install - commands: @@ -3934,6 +4054,7 @@ steps: - commands: - ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} depends_on: + - compile-build-cmd - yarn-install environment: NODE_OPTIONS: --max_old_space_size=8192 @@ -3942,6 +4063,7 @@ steps: - commands: - ./bin/build build-plugins --jobs 8 --edition oss depends_on: + - compile-build-cmd - yarn-install environment: GRAFANA_API_KEY: @@ -4143,12 +4265,10 @@ volumes: clone: retries: 3 depends_on: [] -environment: - EDITION: OSS image_pull_secrets: - dockerconfigjson kind: pipeline -name: release-branch-oss-test +name: release-branch-oss-test-frontend node: type: no-parallel platform: @@ -4166,66 +4286,18 @@ steps: - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl -- commands: - - '# It is required that code generated from Thema/CUE be committed and in sync - with its inputs.' - - '# The following command will fail if running code generators produces any diff - in output.' - - CODEGEN_VERIFY=1 make gen-cue - depends_on: [] - image: grafana/build-container:1.6.3 - name: verify-gen-cue -- commands: - - make gen-go - depends_on: - - verify-gen-cue - image: grafana/build-container:1.6.3 - name: wire-install - commands: - yarn install --immutable - depends_on: - - grabpl + depends_on: [] image: grafana/build-container:1.6.3 name: yarn-install - commands: - - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd - depends_on: [] - environment: - CGO_ENABLED: 0 - image: golang:1.19.2 - name: compile-build-cmd -- commands: - - apt-get update && apt-get install make - - make lint-go - depends_on: - - wire-install - environment: - CGO_ENABLED: "1" - image: golang:1.19.2 - name: lint-backend -- commands: - - yarn run prettier:check - - yarn run lint - - yarn run i18n:compile - - yarn run typecheck + - yarn betterer ci depends_on: - yarn-install - environment: - TEST_MAX_WORKERS: 50% + failure: ignore image: grafana/build-container:1.6.3 - name: lint-frontend -- commands: - - go test -short -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend -- commands: - - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend-integration + name: betterer-frontend - commands: - yarn run ci:test-frontend depends_on: @@ -4247,7 +4319,70 @@ clone: retries: 3 depends_on: [] environment: - EDITION: OSS + EDITION: oss +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: release-branch-oss-test-backend +node: + type: no-parallel +platform: + arch: amd64 + os: linux +services: [] +steps: +- commands: + - echo $DRONE_RUNNER_NAME + image: alpine:3.15.6 + name: identify-runner +- commands: + - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd + depends_on: [] + environment: + CGO_ENABLED: 0 + image: golang:1.19.2 + name: compile-build-cmd +- commands: + - '# It is required that code generated from Thema/CUE be committed and in sync + with its inputs.' + - '# The following command will fail if running code generators produces any diff + in output.' + - CODEGEN_VERIFY=1 make gen-cue + depends_on: [] + image: grafana/build-container:1.6.3 + name: verify-gen-cue +- commands: + - make gen-go + depends_on: + - verify-gen-cue + image: grafana/build-container:1.6.3 + name: wire-install +- commands: + - go test -short -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend +- commands: + - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend-integration +trigger: + ref: + - refs/heads/v[0-9]* +type: docker +volumes: +- host: + path: /var/run/docker.sock + name: docker +--- +clone: + retries: 3 +depends_on: [] +environment: + EDITION: oss image_pull_secrets: - dockerconfigjson kind: pipeline @@ -4355,10 +4490,11 @@ clone: retries: 3 depends_on: - release-branch-oss-build-e2e-publish -- release-branch-oss-test +- release-branch-oss-test-frontend +- release-branch-oss-test-backend - release-branch-oss-integration-tests environment: - EDITION: OSS + EDITION: oss image_pull_secrets: - dockerconfigjson kind: pipeline @@ -4411,7 +4547,7 @@ clone: disable: true depends_on: [] environment: - EDITION: ENTERPRISE + EDITION: enterprise image_pull_secrets: - dockerconfigjson kind: pipeline @@ -4504,6 +4640,7 @@ steps: - commands: - ./bin/build build-frontend-packages --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER} depends_on: + - compile-build-cmd - yarn-install environment: NODE_OPTIONS: --max_old_space_size=8192 @@ -4512,6 +4649,7 @@ steps: - commands: - ./bin/build build-plugins --jobs 8 --edition enterprise depends_on: + - compile-build-cmd - yarn-install environment: GRAFANA_API_KEY: @@ -4749,12 +4887,10 @@ volumes: clone: disable: true depends_on: [] -environment: - EDITION: ENTERPRISE image_pull_secrets: - dockerconfigjson kind: pipeline -name: release-branch-enterprise-test +name: release-branch-enterprise-test-frontend node: type: no-parallel platform: @@ -4762,16 +4898,6 @@ platform: os: linux services: [] steps: -- commands: - - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.10/grabpl - - chmod +x bin/grabpl - image: byrnedo/alpine-curl:0.1.8 - name: grabpl -- commands: - - echo $DRONE_RUNNER_NAME - image: alpine:3.15.6 - name: identify-runner - commands: - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -4795,19 +4921,15 @@ steps: image: grafana/build-container:1.6.3 name: init-enterprise - commands: - - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd - depends_on: - - init-enterprise - environment: - CGO_ENABLED: 0 - image: golang:1.19.2 - name: compile-build-cmd + - echo $DRONE_RUNNER_NAME + image: alpine:3.15.6 + name: identify-runner - commands: - - make gen-go - depends_on: - - init-enterprise - image: grafana/build-container:1.6.3 - name: wire-install + - mkdir -p bin + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.10/grabpl + - chmod +x bin/grabpl + image: byrnedo/alpine-curl:0.1.8 + name: grabpl - commands: - yarn install --immutable depends_on: @@ -4815,70 +4937,22 @@ steps: image: grafana/build-container:1.6.3 name: yarn-install - commands: - - '# It is required that code generated from Thema/CUE be committed and in sync - with its inputs.' - - '# The following command will fail if running code generators produces any diff - in output.' - - CODEGEN_VERIFY=1 make gen-cue + - yarn betterer ci depends_on: - init-enterprise - image: grafana/build-container:1.6.3 - name: verify-gen-cue -- commands: - - apt-get update && apt-get install make - - make lint-go - depends_on: - - wire-install - environment: - CGO_ENABLED: "1" - image: golang:1.19.2 - name: lint-backend -- commands: - - yarn run prettier:check - - yarn run lint - - yarn run i18n:compile - - yarn run typecheck - depends_on: - yarn-install - environment: - TEST_MAX_WORKERS: 50% + failure: ignore image: grafana/build-container:1.6.3 - name: lint-frontend -- commands: - - go test -short -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend -- commands: - - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend-integration + name: betterer-frontend - commands: - yarn run ci:test-frontend depends_on: + - init-enterprise - yarn-install environment: TEST_MAX_WORKERS: 50% image: grafana/build-container:1.6.3 name: test-frontend -- commands: - - apt-get update && apt-get install make - - make lint-go - depends_on: - - wire-install - environment: - CGO_ENABLED: "1" - image: golang:1.19.2 - name: lint-backend-enterprise2 -- commands: - - go test -tags=pro -covermode=atomic -timeout=30m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend-enterprise2 trigger: ref: - refs/heads/v[0-9]* @@ -4892,7 +4966,193 @@ clone: disable: true depends_on: [] environment: - EDITION: ENTERPRISE + EDITION: enterprise +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: release-branch-enterprise-test-backend +node: + type: no-parallel +platform: + arch: amd64 + os: linux +services: [] +steps: +- commands: + - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" + - cd grafana-enterprise + - git checkout ${DRONE_BRANCH} + environment: + GITHUB_TOKEN: + from_secret: github_token + image: grafana/build-container:1.6.3 + name: clone-enterprise +- commands: + - mkdir -p bin + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.10/grabpl + - chmod +x bin/grabpl + image: byrnedo/alpine-curl:0.1.8 + name: grabpl +- commands: + - mv bin/grabpl /tmp/ + - rmdir bin + - mv grafana-enterprise /tmp/ + - /tmp/grabpl init-enterprise /tmp/grafana-enterprise + - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json + - mkdir bin + - mv /tmp/grabpl bin/ + depends_on: + - clone-enterprise + environment: {} + image: grafana/build-container:1.6.3 + name: init-enterprise +- commands: + - echo $DRONE_RUNNER_NAME + image: alpine:3.15.6 + name: identify-runner +- commands: + - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd + depends_on: + - init-enterprise + environment: + CGO_ENABLED: 0 + image: golang:1.19.2 + name: compile-build-cmd +- commands: + - '# It is required that code generated from Thema/CUE be committed and in sync + with its inputs.' + - '# The following command will fail if running code generators produces any diff + in output.' + - CODEGEN_VERIFY=1 make gen-cue + depends_on: + - init-enterprise + image: grafana/build-container:1.6.3 + name: verify-gen-cue +- commands: + - make gen-go + depends_on: + - verify-gen-cue + image: grafana/build-container:1.6.3 + name: wire-install +- commands: + - go test -short -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend +- commands: + - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend-integration +trigger: + ref: + - refs/heads/v[0-9]* +type: docker +volumes: +- host: + path: /var/run/docker.sock + name: docker +--- +clone: + disable: true +depends_on: [] +environment: + EDITION: enterprise2 +image_pull_secrets: +- dockerconfigjson +kind: pipeline +name: release-branch-enterprise2-test-backend +node: + type: no-parallel +platform: + arch: amd64 + os: linux +services: [] +steps: +- commands: + - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" + - cd grafana-enterprise + - git checkout ${DRONE_BRANCH} + environment: + GITHUB_TOKEN: + from_secret: github_token + image: grafana/build-container:1.6.3 + name: clone-enterprise +- commands: + - mkdir -p bin + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.10/grabpl + - chmod +x bin/grabpl + image: byrnedo/alpine-curl:0.1.8 + name: grabpl +- commands: + - mv bin/grabpl /tmp/ + - rmdir bin + - mv grafana-enterprise /tmp/ + - /tmp/grabpl init-enterprise /tmp/grafana-enterprise + - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json + - mkdir bin + - mv /tmp/grabpl bin/ + depends_on: + - clone-enterprise + environment: {} + image: grafana/build-container:1.6.3 + name: init-enterprise +- commands: + - echo $DRONE_RUNNER_NAME + image: alpine:3.15.6 + name: identify-runner +- commands: + - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd + depends_on: + - init-enterprise + environment: + CGO_ENABLED: 0 + image: golang:1.19.2 + name: compile-build-cmd +- commands: + - '# It is required that code generated from Thema/CUE be committed and in sync + with its inputs.' + - '# The following command will fail if running code generators produces any diff + in output.' + - CODEGEN_VERIFY=1 make gen-cue + depends_on: + - init-enterprise + image: grafana/build-container:1.6.3 + name: verify-gen-cue +- commands: + - make gen-go + depends_on: + - verify-gen-cue + image: grafana/build-container:1.6.3 + name: wire-install +- commands: + - go test -tags=pro -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend-enterprise2 +- commands: + - go test -run Integration -covermode=atomic -timeout=30m ./pkg/... + depends_on: + - wire-install + image: grafana/build-container:1.6.3 + name: test-backend-integration +trigger: + ref: + - refs/heads/v[0-9]* +type: docker +volumes: +- host: + path: /var/run/docker.sock + name: docker +--- +clone: + disable: true +depends_on: [] +environment: + EDITION: enterprise image_pull_secrets: - dockerconfigjson kind: pipeline @@ -5047,10 +5307,11 @@ clone: disable: true depends_on: - release-branch-enterprise-build-e2e-publish -- release-branch-enterprise-test +- release-branch-enterprise-test-frontend +- release-branch-enterprise-test-backend - release-branch-enterprise-integration-tests environment: - EDITION: ENTERPRISE + EDITION: enterprise image_pull_secrets: - dockerconfigjson kind: pipeline @@ -5308,6 +5569,6 @@ kind: secret name: packages_secret_access_key --- kind: signature -hmac: f37c416b44c082e9d07c031cb3d173dcd05ffbe812ab73ecc0b375ad8391c041 +hmac: 4e9d5df5ae8f948690185224ea3bcc346af13e67ba201c85ab02c5eef8bb5e67 ... diff --git a/scripts/drone/events/release.star b/scripts/drone/events/release.star index 2114c15531c..6e632699494 100644 --- a/scripts/drone/events/release.star +++ b/scripts/drone/events/release.star @@ -61,6 +61,16 @@ load( 'drone_change_template', ) +load( + 'scripts/drone/pipelines/test_frontend.star', + 'test_frontend', +) + +load( + 'scripts/drone/pipelines/test_backend.star', + 'test_backend', +) + load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket') def store_npm_packages_step(): @@ -113,7 +123,7 @@ def release_npm_packages_step(): } def get_oss_pipelines(trigger, ver_mode): - environment = {'EDITION': 'OSS'} + environment = {'EDITION': 'oss'} edition = 'oss' services = integration_test_services(edition=edition) volumes = integration_test_services_volumes() @@ -130,16 +140,6 @@ def get_oss_pipelines(trigger, ver_mode): compile_build_cmd(), ] - test_steps = [] - - test_steps.extend([ - lint_backend_step(edition=edition), - lint_frontend_step(), - test_backend_step(edition=edition), - test_backend_integration_step(edition=edition), - test_frontend_step(), - ]) - build_steps = [ build_backend_step(edition=edition, ver_mode=ver_mode), build_frontend_step(edition=edition, ver_mode=ver_mode), @@ -202,11 +202,8 @@ def get_oss_pipelines(trigger, ver_mode): ] if not disable_tests: pipelines.extend([ - pipeline( - name='{}-oss-test'.format(ver_mode), edition=edition, trigger=trigger, services=[], - steps=init_steps + test_steps, - environment=environment, volumes=[], - ), + test_frontend(trigger, ver_mode), + test_backend(trigger, ver_mode), pipeline( name='{}-oss-integration-tests'.format(ver_mode), edition=edition, trigger=trigger, services=services, steps=[download_grabpl_step(), identify_runner_step(), verify_gen_cue_step(edition), wire_install_step(), ] + integration_test_steps, @@ -216,7 +213,8 @@ def get_oss_pipelines(trigger, ver_mode): deps = { 'depends_on': [ '{}-oss-build{}-publish'.format(ver_mode, get_e2e_suffix()), - '{}-oss-test'.format(ver_mode), + '{}-oss-test-frontend'.format(ver_mode), + '{}-oss-test-backend'.format(ver_mode), '{}-oss-integration-tests'.format(ver_mode) ] } @@ -226,7 +224,7 @@ def get_oss_pipelines(trigger, ver_mode): return pipelines def get_enterprise_pipelines(trigger, ver_mode): - environment = {'EDITION': 'ENTERPRISE'} + environment = {'EDITION': 'enterprise'} edition = 'enterprise' services = integration_test_services(edition=edition) volumes = integration_test_services_volumes() @@ -244,16 +242,6 @@ def get_enterprise_pipelines(trigger, ver_mode): compile_build_cmd(edition), ] - test_steps = [] - - test_steps.extend([ - lint_backend_step(edition=edition), - lint_frontend_step(), - test_backend_step(edition=edition), - test_backend_integration_step(edition=edition), - test_frontend_step(), - ]) - build_steps = [ build_backend_step(edition=edition, ver_mode=ver_mode), build_frontend_step(edition=edition, ver_mode=ver_mode), @@ -267,10 +255,6 @@ def get_enterprise_pipelines(trigger, ver_mode): ] if include_enterprise: - test_steps.extend([ - lint_backend_step(edition=edition2), - test_backend_step(edition=edition2), - ]) build_steps.extend([ build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-amd64']), ]) @@ -324,7 +308,7 @@ def get_enterprise_pipelines(trigger, ver_mode): ] } - for step in [wire_install_step(), yarn_install_step(), verify_gen_cue_step(edition)]: + for step in [wire_install_step(), yarn_install_step(edition), verify_gen_cue_step(edition)]: step.update(deps_on_clone_enterprise_step) init_steps.extend([step]) @@ -344,11 +328,9 @@ def get_enterprise_pipelines(trigger, ver_mode): ] if not disable_tests: pipelines.extend([ - pipeline( - name='{}-enterprise-test'.format(ver_mode), edition=edition, trigger=trigger, services=[], - steps=init_steps + test_steps, environment=environment, - volumes=[], - ), + test_frontend(trigger, ver_mode, edition), + test_backend(trigger, ver_mode, edition), + test_backend(trigger, ver_mode, edition2), pipeline( name='{}-enterprise-integration-tests'.format(ver_mode), edition=edition, trigger=trigger, services=services, steps=[download_grabpl_step(), identify_runner_step(), clone_enterprise_step(ver_mode), init_enterprise_step(ver_mode), verify_gen_cue_step(edition), wire_install_step()] + integration_test_steps + [redis_integration_tests_step(), memcached_integration_tests_step()], @@ -358,7 +340,8 @@ def get_enterprise_pipelines(trigger, ver_mode): deps = { 'depends_on': [ '{}-enterprise-build{}-publish'.format(ver_mode, get_e2e_suffix()), - '{}-enterprise-test'.format(ver_mode), + '{}-enterprise-test-frontend'.format(ver_mode), + '{}-enterprise-test-backend'.format(ver_mode), '{}-enterprise-integration-tests'.format(ver_mode) ] } diff --git a/scripts/drone/pipelines/docs.star b/scripts/drone/pipelines/docs.star index d7050365a90..eefecd599e7 100644 --- a/scripts/drone/pipelines/docs.star +++ b/scripts/drone/pipelines/docs.star @@ -8,9 +8,7 @@ load( 'codespell_step', 'test_frontend_step', 'build_storybook_step', - 'build_frontend_package_step', 'build_docs_website_step', - 'compile_build_cmd', ) load( @@ -40,9 +38,7 @@ def docs_pipelines(edition, ver_mode, trigger): yarn_install_step(), codespell_step(), lint_docs(), - build_frontend_package_step(edition=edition, ver_mode=ver_mode), build_docs_website_step(), - compile_build_cmd(), ] return pipeline( diff --git a/scripts/drone/pipelines/test_backend.star b/scripts/drone/pipelines/test_backend.star index 1c7c8babe7e..94df1f1e59d 100644 --- a/scripts/drone/pipelines/test_backend.star +++ b/scripts/drone/pipelines/test_backend.star @@ -1,11 +1,14 @@ load( 'scripts/drone/steps/lib.star', 'identify_runner_step', + 'download_grabpl_step', 'wire_install_step', 'test_backend_step', 'test_backend_integration_step', 'verify_gen_cue_step', 'compile_build_cmd', + 'clone_enterprise_step', + 'init_enterprise_step', ) load( @@ -13,18 +16,25 @@ load( 'pipeline', ) -def test_backend(trigger, ver_mode): - init_steps = [ +def test_backend(trigger, ver_mode, edition="oss"): + environment = {'EDITION': edition} + init_steps = [] + if edition != 'oss': + init_steps.extend([clone_enterprise_step(ver_mode), download_grabpl_step(), init_enterprise_step(ver_mode),]) + init_steps.extend([ identify_runner_step(), - compile_build_cmd(), - verify_gen_cue_step(edition="oss"), + compile_build_cmd(edition), + verify_gen_cue_step(edition), wire_install_step(), - ] + ]) test_steps = [ - test_backend_step(edition="oss"), - test_backend_integration_step(edition="oss"), + test_backend_step(edition), + test_backend_integration_step(edition), ] + pipeline_name = '{}-test-backend'.format(ver_mode) + if ver_mode in ("release-branch", "release"): + pipeline_name = '{}-{}-test-backend'.format(ver_mode, edition) return pipeline( - name='{}-test-backend'.format(ver_mode), edition="oss", trigger=trigger, services=[], steps=init_steps + test_steps, + name=pipeline_name, edition=edition, trigger=trigger, services=[], steps=init_steps + test_steps, environment=environment ) diff --git a/scripts/drone/pipelines/test_frontend.star b/scripts/drone/pipelines/test_frontend.star index 4732547de9d..7490c66c2e2 100644 --- a/scripts/drone/pipelines/test_frontend.star +++ b/scripts/drone/pipelines/test_frontend.star @@ -1,11 +1,12 @@ load( 'scripts/drone/steps/lib.star', 'identify_runner_step', + 'clone_enterprise_step', + 'init_enterprise_step', 'download_grabpl_step', 'yarn_install_step', 'betterer_frontend_step', 'test_frontend_step', - 'compile_build_cmd', ) load( @@ -13,17 +14,23 @@ load( 'pipeline', ) -def test_frontend(trigger, ver_mode): - init_steps = [ +def test_frontend(trigger, ver_mode, edition="oss"): + environment = {'EDITION': edition} + init_steps = [] + if edition != 'oss': + init_steps.extend([clone_enterprise_step(ver_mode), init_enterprise_step(ver_mode),]) + init_steps.extend([ identify_runner_step(), download_grabpl_step(), - yarn_install_step(), - compile_build_cmd(), - ] + yarn_install_step(edition), + ]) test_steps = [ - betterer_frontend_step(), - test_frontend_step(), + betterer_frontend_step(edition), + test_frontend_step(edition), ] + pipeline_name = '{}-test-frontend'.format(ver_mode) + if ver_mode in ("release-branch", "release"): + pipeline_name = '{}-{}-test-frontend'.format(ver_mode, edition) return pipeline( - name='{}-test-frontend'.format(ver_mode), edition="oss", trigger=trigger, services=[], steps=init_steps + test_steps, + name=pipeline_name, edition=edition, trigger=trigger, services=[], steps=init_steps + test_steps, ) diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index 8ea816136f4..0bdae20537c 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -36,16 +36,17 @@ def slack_step(channel, template, secret): }, } -def yarn_install_step(): +def yarn_install_step(edition="oss"): + deps = [] + if edition == 'enterprise': + deps = ['init-enterprise'] return { 'name': 'yarn-install', 'image': build_image, 'commands': [ 'yarn install --immutable', ], - 'depends_on': [ - 'grabpl', - ], + 'depends_on': deps, } @@ -449,6 +450,7 @@ def build_frontend_package_step(edition, ver_mode): 'NODE_OPTIONS': '--max_old_space_size=8192', }, 'depends_on': [ + 'compile-build-cmd', 'yarn-install', ], 'commands': cmds, @@ -467,6 +469,7 @@ def build_plugins_step(edition, ver_mode): 'image': build_image, 'environment': env, 'depends_on': [ + 'compile-build-cmd', 'yarn-install', ], 'commands': [ @@ -514,13 +517,15 @@ def test_backend_integration_step(edition): ], } -def betterer_frontend_step(): +def betterer_frontend_step(edition="oss"): + deps = [] + if edition == "enterprise": + deps.extend(['init-enterprise']) + deps.extend(['yarn-install']) return { 'name': 'betterer-frontend', 'image': build_image, - 'depends_on': [ - 'yarn-install', - ], + 'depends_on': deps, 'commands': [ 'yarn betterer ci', ], @@ -529,16 +534,18 @@ def betterer_frontend_step(): -def test_frontend_step(): +def test_frontend_step(edition="oss"): + deps = [] + if edition == "enterprise": + deps.extend(['init-enterprise']) + deps.extend(['yarn-install']) return { 'name': 'test-frontend', 'image': build_image, 'environment': { 'TEST_MAX_WORKERS': '50%', }, - 'depends_on': [ - 'yarn-install', - ], + 'depends_on': deps, 'commands': [ 'yarn run ci:test-frontend', ], @@ -1180,7 +1187,7 @@ def get_windows_steps(edition, ver_mode): def verify_gen_cue_step(edition): deps = [] - if edition == "enterprise": + if edition in ('enterprise', 'enterprise2'): deps.extend(['init-enterprise']) return { 'name': 'verify-gen-cue', @@ -1253,7 +1260,7 @@ def end_to_end_tests_deps(edition): def compile_build_cmd(edition='oss'): dependencies = [] - if edition == 'enterprise': + if edition in ('enterprise', 'enterprise2'): dependencies = ['init-enterprise',] return { 'name': 'compile-build-cmd',