From e8faa2c900bd4c4d8cd455386cb1156c8e6a2053 Mon Sep 17 00:00:00 2001 From: Dimitris Sotirakis Date: Tue, 24 Aug 2021 18:07:06 +0300 Subject: [PATCH] Build pipeline: Cleanup PR pipeline steps (#38447) * Refactor dependencies * Regenerate drone.yml * Reorder steps in starlark files * Make build depend on test * Make test steps depend on lint * Make gen-version step depend on build steps --- .drone.yml | 321 +++++++----------- .../enterprise/access-control/permissions.md | 2 +- scripts/lib.star | 17 +- scripts/main.star | 4 +- scripts/pr.star | 8 +- scripts/release.star | 4 +- 6 files changed, 129 insertions(+), 227 deletions(-) diff --git a/.drone.yml b/.drone.yml index adba665a8bf..7cb1338f314 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,15 +42,6 @@ steps: depends_on: - initialize -- name: test-backend - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition oss - - ./bin/grabpl integration-tests --edition oss - depends_on: - - initialize - - name: lint-backend image: grafana/build-container:1.4.1 commands: @@ -59,7 +50,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend + +- name: test-backend + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition oss + - ./bin/grabpl integration-tests --edition oss + depends_on: + - lint-backend - name: test-frontend image: grafana/build-container:1.4.1 @@ -68,15 +67,13 @@ steps: environment: TEST_MAX_WORKERS: 50% depends_on: - - initialize + - lint-backend - name: build-backend image: grafana/build-container:1.4.1 commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --variants linux-x64,linux-x64-musl,osx64,win64 --no-pull-enterprise depends_on: - - initialize - - lint-backend - test-backend - name: build-frontend @@ -84,7 +81,6 @@ steps: commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: - - initialize - test-frontend - name: build-plugins @@ -92,7 +88,6 @@ steps: commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps depends_on: - - initialize - lint-backend - name: validate-scuemata @@ -107,11 +102,9 @@ steps: commands: - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} depends_on: + - build-plugins - build-backend - build-frontend - - build-plugins - - test-backend - - test-frontend - codespell - shellcheck @@ -166,7 +159,6 @@ steps: - cp -r docs/sources/* /hugo/content/docs/grafana/latest/ - cd /hugo && make prod depends_on: - - initialize - build-frontend-docs - name: copy-packages-for-docker @@ -175,7 +167,6 @@ steps: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - - package - end-to-end-tests-server - name: build-docker-images @@ -186,7 +177,6 @@ steps: edition: oss depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: postgres-integration-tests image: grafana/build-container:1.4.1 @@ -300,15 +290,6 @@ steps: depends_on: - initialize -- name: test-backend - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition oss - - ./bin/grabpl integration-tests --edition oss - depends_on: - - initialize - - name: lint-backend image: grafana/build-container:1.4.1 commands: @@ -317,7 +298,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend + +- name: test-backend + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition oss + - ./bin/grabpl integration-tests --edition oss + depends_on: + - lint-backend - name: test-frontend image: grafana/build-container:1.4.1 @@ -326,15 +315,13 @@ steps: environment: TEST_MAX_WORKERS: 50% depends_on: - - initialize + - lint-backend - name: build-backend image: grafana/build-container:1.4.1 commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: - - initialize - - lint-backend - test-backend - name: build-frontend @@ -342,7 +329,6 @@ steps: commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: - - initialize - test-frontend - name: build-plugins @@ -353,7 +339,6 @@ steps: GRAFANA_API_KEY: from_secret: grafana_api_key depends_on: - - initialize - lint-backend - name: validate-scuemata @@ -368,11 +353,9 @@ steps: commands: - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} depends_on: + - build-plugins - build-backend - build-frontend - - build-plugins - - test-backend - - test-frontend - codespell - shellcheck @@ -475,7 +458,6 @@ steps: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - - package - end-to-end-tests-server - name: build-docker-images @@ -488,7 +470,6 @@ steps: from_secret: docker_user depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: build-docker-images-ubuntu image: grafana/drone-grafana-docker:0.3.2 @@ -501,7 +482,6 @@ steps: from_secret: docker_user depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: postgres-integration-tests image: grafana/build-container:1.4.1 @@ -779,15 +759,6 @@ steps: depends_on: - initialize -- name: test-backend - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition oss --tries 5 - - ./bin/grabpl integration-tests --edition oss --tries 5 - depends_on: - - initialize - - name: lint-backend image: grafana/build-container:1.4.1 commands: @@ -796,7 +767,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend + +- name: test-backend + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition oss --tries 5 + - ./bin/grabpl integration-tests --edition oss --tries 5 + depends_on: + - lint-backend - name: test-frontend image: grafana/build-container:1.4.1 @@ -805,7 +784,7 @@ steps: environment: TEST_MAX_WORKERS: 50% depends_on: - - initialize + - lint-backend - name: build-backend image: grafana/build-container:1.4.1 @@ -815,8 +794,6 @@ steps: GITHUB_TOKEN: from_secret: github_token depends_on: - - initialize - - lint-backend - test-backend - name: build-frontend @@ -824,7 +801,6 @@ steps: commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition oss --no-pull-enterprise ${DRONE_TAG} depends_on: - - initialize - test-frontend - name: build-plugins @@ -835,7 +811,6 @@ steps: GRAFANA_API_KEY: from_secret: grafana_api_key depends_on: - - initialize - lint-backend - name: validate-scuemata @@ -850,11 +825,9 @@ steps: commands: - ./bin/grabpl gen-version ${DRONE_TAG} depends_on: + - build-plugins - build-backend - build-frontend - - build-plugins - - test-backend - - test-frontend - codespell - shellcheck @@ -912,7 +885,6 @@ steps: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - - package - end-to-end-tests-server - name: build-docker-images @@ -925,7 +897,6 @@ steps: from_secret: docker_user depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: build-docker-images-ubuntu image: grafana/drone-grafana-docker:0.3.2 @@ -938,7 +909,6 @@ steps: from_secret: docker_user depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: postgres-integration-tests image: grafana/build-container:1.4.1 @@ -1161,15 +1131,6 @@ steps: depends_on: - initialize -- name: test-backend - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition enterprise --tries 5 - - ./bin/grabpl integration-tests --edition enterprise --tries 5 - depends_on: - - initialize - - name: lint-backend image: grafana/build-container:1.4.1 commands: @@ -1178,7 +1139,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend + +- name: test-backend + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition enterprise --tries 5 + - ./bin/grabpl integration-tests --edition enterprise --tries 5 + depends_on: + - lint-backend - name: test-frontend image: grafana/build-container:1.4.1 @@ -1187,7 +1156,7 @@ steps: environment: TEST_MAX_WORKERS: 50% depends_on: - - initialize + - lint-backend - name: build-backend image: grafana/build-container:1.4.1 @@ -1197,8 +1166,6 @@ steps: GITHUB_TOKEN: from_secret: github_token depends_on: - - initialize - - lint-backend - test-backend - name: build-frontend @@ -1206,7 +1173,6 @@ steps: commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition enterprise --no-pull-enterprise ${DRONE_TAG} depends_on: - - initialize - test-frontend - name: build-plugins @@ -1217,7 +1183,6 @@ steps: GRAFANA_API_KEY: from_secret: grafana_api_key depends_on: - - initialize - lint-backend - name: validate-scuemata @@ -1227,15 +1192,6 @@ steps: depends_on: - build-backend -- name: test-backend-enterprise2 - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition enterprise2 --tries 5 - - ./bin/grabpl integration-tests --edition enterprise2 --tries 5 - depends_on: - - initialize - - name: lint-backend-enterprise2 image: grafana/build-container:1.4.1 commands: @@ -1244,7 +1200,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend-enterprise2 + +- name: test-backend-enterprise2 + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition enterprise2 --tries 5 + - ./bin/grabpl integration-tests --edition enterprise2 --tries 5 + depends_on: + - lint-backend - name: build-backend-enterprise2 image: grafana/build-container:1.4.1 @@ -1254,8 +1218,6 @@ steps: GITHUB_TOKEN: from_secret: github_token depends_on: - - initialize - - lint-backend-enterprise2 - test-backend-enterprise2 - name: gen-version @@ -1263,11 +1225,9 @@ steps: commands: - ./bin/grabpl gen-version ${DRONE_TAG} depends_on: + - build-plugins - build-backend - build-frontend - - build-plugins - - test-backend - - test-frontend - codespell - shellcheck - build-backend-enterprise2 @@ -1319,7 +1279,6 @@ steps: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - - package - end-to-end-tests-server - name: build-docker-images @@ -1332,7 +1291,6 @@ steps: from_secret: docker_user depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: build-docker-images-ubuntu image: grafana/drone-grafana-docker:0.3.2 @@ -1345,7 +1303,6 @@ steps: from_secret: docker_user depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: postgres-integration-tests image: grafana/build-container:1.4.1 @@ -1751,15 +1708,6 @@ steps: depends_on: - initialize -- name: test-backend - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition oss --tries 5 - - ./bin/grabpl integration-tests --edition oss --tries 5 - depends_on: - - initialize - - name: lint-backend image: grafana/build-container:1.4.1 commands: @@ -1768,7 +1716,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend + +- name: test-backend + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition oss --tries 5 + - ./bin/grabpl integration-tests --edition oss --tries 5 + depends_on: + - lint-backend - name: test-frontend image: grafana/build-container:1.4.1 @@ -1777,7 +1733,7 @@ steps: environment: TEST_MAX_WORKERS: 50% depends_on: - - initialize + - lint-backend - name: build-backend image: grafana/build-container:1.4.1 @@ -1787,8 +1743,6 @@ steps: GITHUB_TOKEN: from_secret: github_token depends_on: - - initialize - - lint-backend - test-backend - name: build-frontend @@ -1796,7 +1750,6 @@ steps: 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 - test-frontend - name: build-plugins @@ -1807,7 +1760,6 @@ steps: GRAFANA_API_KEY: from_secret: grafana_api_key depends_on: - - initialize - lint-backend - name: validate-scuemata @@ -1822,11 +1774,9 @@ steps: commands: - ./bin/grabpl gen-version v7.3.0-test depends_on: + - build-plugins - build-backend - build-frontend - - build-plugins - - test-backend - - test-frontend - codespell - shellcheck @@ -1884,7 +1834,6 @@ steps: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - - package - end-to-end-tests-server - name: build-docker-images @@ -1894,7 +1843,6 @@ steps: edition: oss depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: build-docker-images-ubuntu image: grafana/drone-grafana-docker:0.3.2 @@ -1904,7 +1852,6 @@ steps: ubuntu: true depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: postgres-integration-tests image: grafana/build-container:1.4.1 @@ -2122,15 +2069,6 @@ steps: depends_on: - initialize -- name: test-backend - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition enterprise --tries 5 - - ./bin/grabpl integration-tests --edition enterprise --tries 5 - depends_on: - - initialize - - name: lint-backend image: grafana/build-container:1.4.1 commands: @@ -2139,7 +2077,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend + +- name: test-backend + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition enterprise --tries 5 + - ./bin/grabpl integration-tests --edition enterprise --tries 5 + depends_on: + - lint-backend - name: test-frontend image: grafana/build-container:1.4.1 @@ -2148,7 +2094,7 @@ steps: environment: TEST_MAX_WORKERS: 50% depends_on: - - initialize + - lint-backend - name: build-backend image: grafana/build-container:1.4.1 @@ -2158,8 +2104,6 @@ steps: GITHUB_TOKEN: from_secret: github_token depends_on: - - initialize - - lint-backend - test-backend - name: build-frontend @@ -2167,7 +2111,6 @@ steps: 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 - test-frontend - name: build-plugins @@ -2178,7 +2121,6 @@ steps: GRAFANA_API_KEY: from_secret: grafana_api_key depends_on: - - initialize - lint-backend - name: validate-scuemata @@ -2188,15 +2130,6 @@ steps: depends_on: - build-backend -- name: test-backend-enterprise2 - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition enterprise2 --tries 5 - - ./bin/grabpl integration-tests --edition enterprise2 --tries 5 - depends_on: - - initialize - - name: lint-backend-enterprise2 image: grafana/build-container:1.4.1 commands: @@ -2205,7 +2138,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend-enterprise2 + +- name: test-backend-enterprise2 + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition enterprise2 --tries 5 + - ./bin/grabpl integration-tests --edition enterprise2 --tries 5 + depends_on: + - lint-backend - name: build-backend-enterprise2 image: grafana/build-container:1.4.1 @@ -2215,8 +2156,6 @@ steps: GITHUB_TOKEN: from_secret: github_token depends_on: - - initialize - - lint-backend-enterprise2 - test-backend-enterprise2 - name: gen-version @@ -2224,11 +2163,9 @@ steps: commands: - ./bin/grabpl gen-version v7.3.0-test depends_on: + - build-plugins - build-backend - build-frontend - - build-plugins - - test-backend - - test-frontend - codespell - shellcheck - build-backend-enterprise2 @@ -2280,7 +2217,6 @@ steps: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - - package - end-to-end-tests-server - name: build-docker-images @@ -2290,7 +2226,6 @@ steps: edition: enterprise depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: build-docker-images-ubuntu image: grafana/drone-grafana-docker:0.3.2 @@ -2300,7 +2235,6 @@ steps: ubuntu: true depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: postgres-integration-tests image: grafana/build-container:1.4.1 @@ -2705,15 +2639,6 @@ steps: depends_on: - initialize -- name: test-backend - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition oss - - ./bin/grabpl integration-tests --edition oss - depends_on: - - initialize - - name: lint-backend image: grafana/build-container:1.4.1 commands: @@ -2722,7 +2647,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend + +- name: test-backend + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition oss + - ./bin/grabpl integration-tests --edition oss + depends_on: + - lint-backend - name: test-frontend image: grafana/build-container:1.4.1 @@ -2731,15 +2664,13 @@ steps: environment: TEST_MAX_WORKERS: 50% depends_on: - - initialize + - lint-backend - name: build-backend image: grafana/build-container:1.4.1 commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: - - initialize - - lint-backend - test-backend - name: build-frontend @@ -2747,7 +2678,6 @@ steps: commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: - - initialize - test-frontend - name: build-plugins @@ -2758,7 +2688,6 @@ steps: GRAFANA_API_KEY: from_secret: grafana_api_key depends_on: - - initialize - lint-backend - name: validate-scuemata @@ -2773,11 +2702,9 @@ steps: commands: - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} depends_on: + - build-plugins - build-backend - build-frontend - - build-plugins - - test-backend - - test-frontend - codespell - shellcheck @@ -2835,7 +2762,6 @@ steps: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - - package - end-to-end-tests-server - name: build-docker-images @@ -2845,7 +2771,6 @@ steps: edition: oss depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: build-docker-images-ubuntu image: grafana/drone-grafana-docker:0.3.2 @@ -2855,7 +2780,6 @@ steps: ubuntu: true depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: postgres-integration-tests image: grafana/build-container:1.4.1 @@ -3047,15 +2971,6 @@ steps: depends_on: - initialize -- name: test-backend - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition enterprise - - ./bin/grabpl integration-tests --edition enterprise - depends_on: - - initialize - - name: lint-backend image: grafana/build-container:1.4.1 commands: @@ -3064,7 +2979,15 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend + +- name: test-backend + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition enterprise + - ./bin/grabpl integration-tests --edition enterprise + depends_on: + - lint-backend - name: test-frontend image: grafana/build-container:1.4.1 @@ -3073,15 +2996,13 @@ steps: environment: TEST_MAX_WORKERS: 50% depends_on: - - initialize + - lint-backend - name: build-backend image: grafana/build-container:1.4.1 commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: - - initialize - - lint-backend - test-backend - name: build-frontend @@ -3089,7 +3010,6 @@ steps: commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition enterprise --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise depends_on: - - initialize - test-frontend - name: build-plugins @@ -3100,7 +3020,6 @@ steps: GRAFANA_API_KEY: from_secret: grafana_api_key depends_on: - - initialize - lint-backend - name: validate-scuemata @@ -3110,15 +3029,6 @@ steps: depends_on: - build-backend -- name: test-backend-enterprise2 - image: grafana/build-container:1.4.1 - commands: - - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" - - ./bin/grabpl test-backend --edition enterprise2 - - ./bin/grabpl integration-tests --edition enterprise2 - depends_on: - - initialize - - name: lint-backend-enterprise2 image: grafana/build-container:1.4.1 commands: @@ -3127,15 +3037,21 @@ steps: CGO_ENABLED: 1 depends_on: - initialize - - test-backend-enterprise2 + +- name: test-backend-enterprise2 + image: grafana/build-container:1.4.1 + commands: + - "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1" + - ./bin/grabpl test-backend --edition enterprise2 + - ./bin/grabpl integration-tests --edition enterprise2 + depends_on: + - lint-backend - name: build-backend-enterprise2 image: grafana/build-container:1.4.1 commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER} --variants linux-x64 --no-pull-enterprise depends_on: - - initialize - - lint-backend-enterprise2 - test-backend-enterprise2 - name: gen-version @@ -3143,11 +3059,9 @@ steps: commands: - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} depends_on: + - build-plugins - build-backend - build-frontend - - build-plugins - - test-backend - - test-frontend - codespell - shellcheck - build-backend-enterprise2 @@ -3209,7 +3123,6 @@ steps: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - - package - end-to-end-tests-server - name: build-docker-images @@ -3219,7 +3132,6 @@ steps: edition: enterprise depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: build-docker-images-ubuntu image: grafana/drone-grafana-docker:0.3.2 @@ -3229,7 +3141,6 @@ steps: ubuntu: true depends_on: - copy-packages-for-docker - - end-to-end-tests-server - name: postgres-integration-tests image: grafana/build-container:1.4.1 @@ -3577,6 +3488,6 @@ get: --- kind: signature -hmac: 9059b8ad45f49ce540c8af4261abac6026995fe6437fb8d85395e4994ed72d1b +hmac: 46c461a3795fa80e2411fd9928b7727e582fbc6f5cdf065b84cea97e4413a878 ... diff --git a/docs/sources/enterprise/access-control/permissions.md b/docs/sources/enterprise/access-control/permissions.md index 9a8cded1f9a..ed89888b251 100644 --- a/docs/sources/enterprise/access-control/permissions.md +++ b/docs/sources/enterprise/access-control/permissions.md @@ -80,4 +80,4 @@ The following list contains fine-grained access control scopes. | `services:accesscontrol` | Restrict an action to target only the fine-grained access control service. For example, you can use this in conjunction with the `provisioning:reload` or the `status:accesscontrol` actions. | | `global:users:*` | Restrict an action to a set of global users. | | `users:*` | Restrict an action to a set of users from an organization. | -| `settings:*` | Restrict an action to a subset of settings. For example, `settings:*` matches all settings, `settings:auth.saml:*` matches all SAML settings, and `settings:auth.saml:enabled` matches the enable property on the SAML settings. | +| `settings:*` | Restrict an action to a subset of settings. For example, `settings:*` matches all settings, `settings:auth.saml:*` matches all SAML settings, and `settings:auth.saml:enabled` matches the enable property on the SAML settings. | diff --git a/scripts/lib.star b/scripts/lib.star index 0f22e7feb85..5a2b639351d 100644 --- a/scripts/lib.star +++ b/scripts/lib.star @@ -223,7 +223,6 @@ def lint_backend_step(edition): }, 'depends_on': [ 'initialize', - 'test-backend' + enterprise2_sfx(edition), ], 'commands': [ # Don't use Make since it will re-download the linters @@ -368,8 +367,6 @@ def build_backend_step(edition, ver_mode, variants=None, is_downstream=False): 'name': 'build-backend' + enterprise2_sfx(edition), 'image': build_image, 'depends_on': [ - 'initialize', - 'lint-backend' + enterprise2_sfx(edition), 'test-backend' + enterprise2_sfx(edition), ], 'environment': env, @@ -403,7 +400,6 @@ def build_frontend_step(edition, ver_mode, is_downstream=False): 'name': 'build-frontend', 'image': build_image, 'depends_on': [ - 'initialize', 'test-frontend', ], 'commands': cmds, @@ -434,7 +430,6 @@ def build_plugins_step(edition, sign=False): 'name': 'build-plugins', 'image': build_image, 'depends_on': [ - 'initialize', 'lint-backend', ], 'environment': env, @@ -454,7 +449,7 @@ def test_backend_step(edition, tries=None): 'name': 'test-backend' + enterprise2_sfx(edition), 'image': build_image, 'depends_on': [ - 'initialize', + 'lint-backend', ], 'commands': [ # First make sure that there are no tests with FocusConvey @@ -471,7 +466,7 @@ def test_frontend_step(): 'name': 'test-frontend', 'image': build_image, 'depends_on': [ - 'initialize', + 'lint-backend', ], 'environment': { 'TEST_MAX_WORKERS': '50%', @@ -547,11 +542,9 @@ def shellcheck_step(): def gen_version_step(ver_mode, include_enterprise2=False, is_downstream=False): deps = [ + 'build-plugins', 'build-backend', 'build-frontend', - 'build-plugins', - 'test-backend', - 'test-frontend', 'codespell', 'shellcheck', ] @@ -694,7 +687,6 @@ def build_docs_website_step(): # Use latest revision here, since we want to catch if it breaks 'image': 'grafana/docs-base:latest', 'depends_on': [ - 'initialize', 'build-frontend-docs', ], 'commands': [ @@ -709,7 +701,6 @@ def copy_packages_for_docker_step(): 'name': 'copy-packages-for-docker', 'image': build_image, 'depends_on': [ - 'package', 'end-to-end-tests-server', ], 'commands': [ @@ -740,7 +731,7 @@ def build_docker_images_step(edition, ver_mode, archs=None, ubuntu=False, publis return { 'name': 'build-docker-images' + ubuntu_sfx, 'image': grafana_docker_image, - 'depends_on': ['copy-packages-for-docker', 'end-to-end-tests-server'], + 'depends_on': ['copy-packages-for-docker'], 'settings': settings, } diff --git a/scripts/main.star b/scripts/main.star index 1ae5b656c68..6591f70f2e4 100644 --- a/scripts/main.star +++ b/scripts/main.star @@ -47,8 +47,8 @@ def get_steps(edition, is_downstream=False): enterprise_downstream_step(edition=edition), codespell_step(), shellcheck_step(), - test_backend_step(edition=edition), lint_backend_step(edition=edition), + test_backend_step(edition=edition), test_frontend_step(), build_backend_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream), build_frontend_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream), @@ -60,8 +60,8 @@ def get_steps(edition, is_downstream=False): if include_enterprise2: edition2 = 'enterprise2' steps.extend([ - test_backend_step(edition=edition2), lint_backend_step(edition=edition2), + test_backend_step(edition=edition2), build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64'], is_downstream=is_downstream), ]) diff --git a/scripts/pr.star b/scripts/pr.star index 159b465016e..e1b57004a9e 100644 --- a/scripts/pr.star +++ b/scripts/pr.star @@ -4,11 +4,11 @@ load( 'lint_backend_step', 'codespell_step', 'shellcheck_step', - 'test_backend_step', - 'test_frontend_step', 'build_backend_step', 'build_frontend_step', 'build_plugins_step', + 'test_backend_step', + 'test_frontend_step', 'gen_version_step', 'package_step', 'e2e_tests_server_step', @@ -37,8 +37,8 @@ def pr_pipelines(edition): steps = [ codespell_step(), shellcheck_step(), - test_backend_step(edition=edition), lint_backend_step(edition=edition), + test_backend_step(edition=edition), test_frontend_step(), build_backend_step(edition=edition, ver_mode=ver_mode, variants=variants), build_frontend_step(edition=edition, ver_mode=ver_mode), @@ -52,8 +52,8 @@ def pr_pipelines(edition): steps.append(benchmark_ldap_step()) services.append(ldap_service()) steps.extend([ - test_backend_step(edition=edition2), lint_backend_step(edition=edition2), + test_backend_step(edition=edition2), build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64']), ]) diff --git a/scripts/release.star b/scripts/release.star index 068081613cd..d5217b7fd4d 100644 --- a/scripts/release.star +++ b/scripts/release.star @@ -74,8 +74,8 @@ def get_steps(edition, ver_mode): steps = [ codespell_step(), shellcheck_step(), - test_backend_step(edition=edition, tries=tries), lint_backend_step(edition=edition), + test_backend_step(edition=edition, tries=tries), test_frontend_step(), build_backend_step(edition=edition, ver_mode=ver_mode), build_frontend_step(edition=edition, ver_mode=ver_mode), @@ -87,8 +87,8 @@ def get_steps(edition, ver_mode): if include_enterprise2: edition2 = 'enterprise2' steps.extend([ - test_backend_step(edition=edition2, tries=tries), lint_backend_step(edition=edition2), + test_backend_step(edition=edition2, tries=tries), build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64']), ])