From f3b8cd1c98141c4a37b8d97cfc4b0fc33a9216be Mon Sep 17 00:00:00 2001 From: Dimitris Sotirakis Date: Wed, 2 Nov 2022 10:13:12 +0200 Subject: [PATCH] CI: Remove `*-test-backend-enterprise2` pipelines (#58028) * Remove test-backend-enterprise2 pipelines * Remove leftover --- .drone.yml | 196 +----------------------------- scripts/drone/events/release.star | 1 - scripts/drone/steps/lib.star | 34 ++---- 3 files changed, 12 insertions(+), 219 deletions(-) diff --git a/.drone.yml b/.drone.yml index 548a4034431..714c37be098 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3013,105 +3013,6 @@ volumes: 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.15/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=5m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend-enterprise2 -- commands: - - go test -run Integration -covermode=atomic -timeout=5m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend-integration -trigger: - event: - exclude: - - promote - ref: - - refs/tags/v* -type: docker -volumes: -- host: - path: /var/run/docker.sock - name: docker ---- -clone: - disable: true -depends_on: [] environment: EDITION: enterprise image_pull_secrets: @@ -5071,101 +4972,6 @@ volumes: 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.15/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 - - 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=5m ./pkg/... - depends_on: - - wire-install - image: grafana/build-container:1.6.3 - name: test-backend-enterprise2 -- commands: - - go test -run Integration -covermode=atomic -timeout=5m ./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: @@ -5617,6 +5423,6 @@ kind: secret name: packages_secret_access_key --- kind: signature -hmac: 8fa30bed45bfe34112b376b5ea33bf83e745841e2dcceebf1a02885301f7fb51 +hmac: 96004f03bf2032c32fa88303da619580dd72f9a460d4bf90b4faacb7ccceb6b4 ... diff --git a/scripts/drone/events/release.star b/scripts/drone/events/release.star index 104cbdeb91e..7a6912cf1d3 100644 --- a/scripts/drone/events/release.star +++ b/scripts/drone/events/release.star @@ -330,7 +330,6 @@ def get_enterprise_pipelines(trigger, ver_mode): pipelines.extend([ 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()], diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index 96f9ef61de7..1c3a21f2f79 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -209,7 +209,7 @@ def enterprise_downstream_step(edition, ver_mode): def lint_backend_step(edition): return { - 'name': 'lint-backend' + enterprise2_suffix(edition), + 'name': 'lint-backend', 'image': go_image, 'environment': { # We need CGO because of go-sqlite3 @@ -481,28 +481,16 @@ def build_plugins_step(edition, ver_mode): def test_backend_step(edition): - if edition == 'enterprise2': - return { - 'name': 'test-backend' + enterprise2_suffix(edition), - 'image': build_image, - 'depends_on': [ - 'wire-install', - ], - 'commands': [ - 'go test -tags=pro -covermode=atomic -timeout=5m ./pkg/...', - ], - } - else: - return { - 'name': 'test-backend' + enterprise2_suffix(edition), - 'image': build_image, - 'depends_on': [ - 'wire-install', - ], - 'commands': [ - 'go test -short -covermode=atomic -timeout=5m ./pkg/...', - ], - } + return { + 'name': 'test-backend', + 'image': build_image, + 'depends_on': [ + 'wire-install', + ], + 'commands': [ + 'go test -short -covermode=atomic -timeout=5m ./pkg/...', + ], + }