mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 19:03:53 +08:00
Drone: Fix race conditions between Enterprise and Enterprise2 (#30076)
* Drone: Fix race conditions between Enterprise and Enterprise2 Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
489
.drone.yml
489
.drone.yml
@ -17,7 +17,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- ./bin/grabpl verify-drone
|
- ./bin/grabpl verify-drone
|
||||||
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
||||||
@ -30,7 +30,7 @@ steps:
|
|||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl lint-backend
|
- ./bin/grabpl lint-backend --edition oss
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -62,8 +62,8 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend --edition oss
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests --edition oss
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
@ -102,10 +102,10 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: package
|
- name: gen-version
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-x64,linux-x64-musl,osx64,win64
|
- ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER}
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- build-backend
|
||||||
- build-frontend
|
- build-frontend
|
||||||
@ -116,6 +116,13 @@ steps:
|
|||||||
- shellcheck
|
- shellcheck
|
||||||
- check-dashboard-schemas
|
- check-dashboard-schemas
|
||||||
|
|
||||||
|
- name: package
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-x64,linux-x64-musl,osx64,win64
|
||||||
|
depends_on:
|
||||||
|
- gen-version
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
detach: true
|
detach: true
|
||||||
@ -166,6 +173,7 @@ steps:
|
|||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
|
- ls dist/*.tar.gz*
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
@ -251,7 +259,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- ./bin/grabpl verify-drone
|
- ./bin/grabpl verify-drone
|
||||||
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
||||||
@ -276,7 +284,7 @@ steps:
|
|||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl lint-backend
|
- ./bin/grabpl lint-backend --edition oss
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -308,8 +316,8 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend --edition oss
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests --edition oss
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
@ -362,6 +370,20 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
|
- name: gen-version
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER}
|
||||||
|
depends_on:
|
||||||
|
- build-backend
|
||||||
|
- build-frontend
|
||||||
|
- build-plugins
|
||||||
|
- test-backend
|
||||||
|
- test-frontend
|
||||||
|
- codespell
|
||||||
|
- shellcheck
|
||||||
|
- check-dashboard-schemas
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
@ -378,14 +400,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -440,6 +455,7 @@ steps:
|
|||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
|
- ls dist/*.tar.gz*
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
@ -565,7 +581,7 @@ steps:
|
|||||||
image: grafana/ci-wix:0.1.1
|
image: grafana/ci-wix:0.1.1
|
||||||
commands:
|
commands:
|
||||||
- $$ProgressPreference = "SilentlyContinue"
|
- $$ProgressPreference = "SilentlyContinue"
|
||||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/windows/grabpl.exe -OutFile grabpl.exe
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/windows/grabpl.exe -OutFile grabpl.exe
|
||||||
- .\grabpl.exe verify-drone
|
- .\grabpl.exe verify-drone
|
||||||
|
|
||||||
- name: build-windows-installer
|
- name: build-windows-installer
|
||||||
@ -615,7 +631,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- ./bin/grabpl verify-drone
|
- ./bin/grabpl verify-drone
|
||||||
environment:
|
environment:
|
||||||
@ -700,7 +716,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- ./bin/grabpl verify-drone
|
- ./bin/grabpl verify-drone
|
||||||
- ./bin/grabpl verify-version ${DRONE_TAG}
|
- ./bin/grabpl verify-version ${DRONE_TAG}
|
||||||
@ -714,7 +730,7 @@ steps:
|
|||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl lint-backend
|
- ./bin/grabpl lint-backend --edition oss
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -746,8 +762,8 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend --edition oss
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests --edition oss
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
@ -792,6 +808,20 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
|
- name: gen-version
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl gen-version ${DRONE_TAG}
|
||||||
|
depends_on:
|
||||||
|
- build-backend
|
||||||
|
- build-frontend
|
||||||
|
- build-plugins
|
||||||
|
- test-backend
|
||||||
|
- test-frontend
|
||||||
|
- codespell
|
||||||
|
- shellcheck
|
||||||
|
- check-dashboard-schemas
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
@ -808,14 +838,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -850,6 +873,7 @@ steps:
|
|||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
|
- ls dist/*.tar.gz*
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
@ -987,7 +1011,7 @@ steps:
|
|||||||
image: grafana/ci-wix:0.1.1
|
image: grafana/ci-wix:0.1.1
|
||||||
commands:
|
commands:
|
||||||
- $$ProgressPreference = "SilentlyContinue"
|
- $$ProgressPreference = "SilentlyContinue"
|
||||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/windows/grabpl.exe -OutFile grabpl.exe
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/windows/grabpl.exe -OutFile grabpl.exe
|
||||||
- .\grabpl.exe verify-drone
|
- .\grabpl.exe verify-drone
|
||||||
|
|
||||||
- name: build-windows-installer
|
- name: build-windows-installer
|
||||||
@ -1038,7 +1062,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
||||||
- cd grafana-enterprise
|
- cd grafana-enterprise
|
||||||
@ -1070,7 +1094,7 @@ steps:
|
|||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl lint-backend
|
- ./bin/grabpl lint-backend --edition enterprise
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -1102,8 +1126,8 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend --edition enterprise
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests --edition enterprise
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
@ -1148,6 +1172,53 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
|
- name: lint-backend-enterprise2
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl lint-backend --edition enterprise2
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 1
|
||||||
|
depends_on:
|
||||||
|
- initialize
|
||||||
|
|
||||||
|
- name: test-backend-enterprise2
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
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
|
||||||
|
- lint-backend-enterprise2
|
||||||
|
|
||||||
|
- name: build-backend-enterprise2
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise ${DRONE_TAG}
|
||||||
|
environment:
|
||||||
|
GITHUB_TOKEN:
|
||||||
|
from_secret: github_token
|
||||||
|
depends_on:
|
||||||
|
- initialize
|
||||||
|
- lint-backend-enterprise2
|
||||||
|
- test-backend-enterprise2
|
||||||
|
|
||||||
|
- name: gen-version
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl gen-version ${DRONE_TAG}
|
||||||
|
depends_on:
|
||||||
|
- build-backend
|
||||||
|
- build-frontend
|
||||||
|
- build-plugins
|
||||||
|
- test-backend
|
||||||
|
- test-frontend
|
||||||
|
- codespell
|
||||||
|
- shellcheck
|
||||||
|
- check-dashboard-schemas
|
||||||
|
- build-backend-enterprise2
|
||||||
|
- test-backend-enterprise2
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
@ -1164,14 +1235,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -1198,6 +1262,7 @@ steps:
|
|||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
|
- ls dist/*.tar.gz*
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
@ -1271,41 +1336,10 @@ steps:
|
|||||||
- mysql-integration-tests
|
- mysql-integration-tests
|
||||||
- postgres-integration-tests
|
- postgres-integration-tests
|
||||||
|
|
||||||
- name: lint-backend-enterprise2
|
|
||||||
image: grafana/build-container:1.3.0
|
|
||||||
commands:
|
|
||||||
- ./bin/grabpl lint-backend --build-tags=enterprise2
|
|
||||||
environment:
|
|
||||||
CGO_ENABLED: 1
|
|
||||||
depends_on:
|
|
||||||
- initialize
|
|
||||||
|
|
||||||
- name: test-backend-enterprise2
|
|
||||||
image: grafana/build-container:1.3.0
|
|
||||||
commands:
|
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
|
||||||
- ./bin/grabpl test-backend --build-tags enterprise2
|
|
||||||
- ./bin/grabpl integration-tests --build-tags enterprise2
|
|
||||||
depends_on:
|
|
||||||
- initialize
|
|
||||||
- lint-backend-enterprise2
|
|
||||||
|
|
||||||
- name: build-backend-enterprise2
|
|
||||||
image: grafana/build-container:1.3.0
|
|
||||||
commands:
|
|
||||||
- ./bin/grabpl build-backend --jobs 8 --edition enterprise --build-tags enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise ${DRONE_TAG}
|
|
||||||
environment:
|
|
||||||
GITHUB_TOKEN:
|
|
||||||
from_secret: github_token
|
|
||||||
depends_on:
|
|
||||||
- initialize
|
|
||||||
- lint-backend-enterprise2
|
|
||||||
- test-backend-enterprise2
|
|
||||||
|
|
||||||
- name: package-enterprise2
|
- name: package-enterprise2
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl package --jobs 8 --edition enterprise --build-tags enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign ${DRONE_TAG}
|
- ./bin/grabpl package --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign ${DRONE_TAG}
|
||||||
environment:
|
environment:
|
||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
@ -1318,14 +1352,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend-enterprise2
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend-enterprise2
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server-enterprise2
|
- name: end-to-end-tests-server-enterprise2
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -1352,7 +1379,7 @@ steps:
|
|||||||
- name: upload-packages-enterprise2
|
- name: upload-packages-enterprise2
|
||||||
image: grafana/grafana-ci-deploy:1.2.7
|
image: grafana/grafana-ci-deploy:1.2.7
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl upload-packages --edition enterprise --build-tags enterprise2 --packages-bucket grafana-downloads-enterprise2
|
- ./bin/grabpl upload-packages --edition enterprise2 --packages-bucket grafana-downloads-enterprise2
|
||||||
environment:
|
environment:
|
||||||
GCP_GRAFANA_UPLOAD_KEY:
|
GCP_GRAFANA_UPLOAD_KEY:
|
||||||
from_secret: gcp_key
|
from_secret: gcp_key
|
||||||
@ -1405,7 +1432,7 @@ steps:
|
|||||||
image: grafana/ci-wix:0.1.1
|
image: grafana/ci-wix:0.1.1
|
||||||
commands:
|
commands:
|
||||||
- $$ProgressPreference = "SilentlyContinue"
|
- $$ProgressPreference = "SilentlyContinue"
|
||||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/windows/grabpl.exe -OutFile grabpl.exe
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/windows/grabpl.exe -OutFile grabpl.exe
|
||||||
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
||||||
- cd grafana-enterprise
|
- cd grafana-enterprise
|
||||||
- git checkout ${DRONE_TAG}
|
- git checkout ${DRONE_TAG}
|
||||||
@ -1471,7 +1498,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- ./bin/grabpl verify-drone
|
- ./bin/grabpl verify-drone
|
||||||
- ./bin/grabpl verify-version ${DRONE_TAG}
|
- ./bin/grabpl verify-version ${DRONE_TAG}
|
||||||
@ -1576,7 +1603,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- ./bin/grabpl verify-drone
|
- ./bin/grabpl verify-drone
|
||||||
- ./bin/grabpl verify-version v7.3.0-test
|
- ./bin/grabpl verify-version v7.3.0-test
|
||||||
@ -1590,7 +1617,7 @@ steps:
|
|||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl lint-backend
|
- ./bin/grabpl lint-backend --edition oss
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -1622,8 +1649,8 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend --edition oss
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests --edition oss
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
@ -1668,6 +1695,20 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
|
- name: gen-version
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl gen-version v7.3.0-test
|
||||||
|
depends_on:
|
||||||
|
- build-backend
|
||||||
|
- build-frontend
|
||||||
|
- build-plugins
|
||||||
|
- test-backend
|
||||||
|
- test-frontend
|
||||||
|
- codespell
|
||||||
|
- shellcheck
|
||||||
|
- check-dashboard-schemas
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
@ -1684,14 +1725,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -1726,6 +1760,7 @@ steps:
|
|||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
|
- ls dist/*.tar.gz*
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
@ -1852,7 +1887,7 @@ steps:
|
|||||||
image: grafana/ci-wix:0.1.1
|
image: grafana/ci-wix:0.1.1
|
||||||
commands:
|
commands:
|
||||||
- $$ProgressPreference = "SilentlyContinue"
|
- $$ProgressPreference = "SilentlyContinue"
|
||||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/windows/grabpl.exe -OutFile grabpl.exe
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/windows/grabpl.exe -OutFile grabpl.exe
|
||||||
- .\grabpl.exe verify-drone
|
- .\grabpl.exe verify-drone
|
||||||
|
|
||||||
- name: build-windows-installer
|
- name: build-windows-installer
|
||||||
@ -1903,7 +1938,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
||||||
- cd grafana-enterprise
|
- cd grafana-enterprise
|
||||||
@ -1935,7 +1970,7 @@ steps:
|
|||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl lint-backend
|
- ./bin/grabpl lint-backend --edition enterprise
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -1967,8 +2002,8 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend --edition enterprise
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests --edition enterprise
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
@ -2013,6 +2048,53 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
|
- name: lint-backend-enterprise2
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl lint-backend --edition enterprise2
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 1
|
||||||
|
depends_on:
|
||||||
|
- initialize
|
||||||
|
|
||||||
|
- name: test-backend-enterprise2
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
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
|
||||||
|
- lint-backend-enterprise2
|
||||||
|
|
||||||
|
- name: build-backend-enterprise2
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise v7.3.0-test
|
||||||
|
environment:
|
||||||
|
GITHUB_TOKEN:
|
||||||
|
from_secret: github_token
|
||||||
|
depends_on:
|
||||||
|
- initialize
|
||||||
|
- lint-backend-enterprise2
|
||||||
|
- test-backend-enterprise2
|
||||||
|
|
||||||
|
- name: gen-version
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl gen-version v7.3.0-test
|
||||||
|
depends_on:
|
||||||
|
- build-backend
|
||||||
|
- build-frontend
|
||||||
|
- build-plugins
|
||||||
|
- test-backend
|
||||||
|
- test-frontend
|
||||||
|
- codespell
|
||||||
|
- shellcheck
|
||||||
|
- check-dashboard-schemas
|
||||||
|
- build-backend-enterprise2
|
||||||
|
- test-backend-enterprise2
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
@ -2029,14 +2111,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -2063,6 +2138,7 @@ steps:
|
|||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
|
- ls dist/*.tar.gz*
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
@ -2130,41 +2206,10 @@ steps:
|
|||||||
- mysql-integration-tests
|
- mysql-integration-tests
|
||||||
- postgres-integration-tests
|
- postgres-integration-tests
|
||||||
|
|
||||||
- name: lint-backend-enterprise2
|
|
||||||
image: grafana/build-container:1.3.0
|
|
||||||
commands:
|
|
||||||
- ./bin/grabpl lint-backend --build-tags=enterprise2
|
|
||||||
environment:
|
|
||||||
CGO_ENABLED: 1
|
|
||||||
depends_on:
|
|
||||||
- initialize
|
|
||||||
|
|
||||||
- name: test-backend-enterprise2
|
|
||||||
image: grafana/build-container:1.3.0
|
|
||||||
commands:
|
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
|
||||||
- ./bin/grabpl test-backend --build-tags enterprise2
|
|
||||||
- ./bin/grabpl integration-tests --build-tags enterprise2
|
|
||||||
depends_on:
|
|
||||||
- initialize
|
|
||||||
- lint-backend-enterprise2
|
|
||||||
|
|
||||||
- name: build-backend-enterprise2
|
|
||||||
image: grafana/build-container:1.3.0
|
|
||||||
commands:
|
|
||||||
- ./bin/grabpl build-backend --jobs 8 --edition enterprise --build-tags enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise v7.3.0-test
|
|
||||||
environment:
|
|
||||||
GITHUB_TOKEN:
|
|
||||||
from_secret: github_token
|
|
||||||
depends_on:
|
|
||||||
- initialize
|
|
||||||
- lint-backend-enterprise2
|
|
||||||
- test-backend-enterprise2
|
|
||||||
|
|
||||||
- name: package-enterprise2
|
- name: package-enterprise2
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl package --jobs 8 --edition enterprise --build-tags enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign v7.3.0-test
|
- ./bin/grabpl package --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign v7.3.0-test
|
||||||
environment:
|
environment:
|
||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
@ -2177,14 +2222,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend-enterprise2
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend-enterprise2
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server-enterprise2
|
- name: end-to-end-tests-server-enterprise2
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -2211,7 +2249,7 @@ steps:
|
|||||||
- name: upload-packages-enterprise2
|
- name: upload-packages-enterprise2
|
||||||
image: grafana/grafana-ci-deploy:1.2.7
|
image: grafana/grafana-ci-deploy:1.2.7
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl upload-packages --edition enterprise --build-tags enterprise2 --packages-bucket grafana-downloads-test
|
- ./bin/grabpl upload-packages --edition enterprise2 --packages-bucket grafana-downloads-test
|
||||||
environment:
|
environment:
|
||||||
GCP_GRAFANA_UPLOAD_KEY:
|
GCP_GRAFANA_UPLOAD_KEY:
|
||||||
from_secret: gcp_key
|
from_secret: gcp_key
|
||||||
@ -2264,7 +2302,7 @@ steps:
|
|||||||
image: grafana/ci-wix:0.1.1
|
image: grafana/ci-wix:0.1.1
|
||||||
commands:
|
commands:
|
||||||
- $$ProgressPreference = "SilentlyContinue"
|
- $$ProgressPreference = "SilentlyContinue"
|
||||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/windows/grabpl.exe -OutFile grabpl.exe
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/windows/grabpl.exe -OutFile grabpl.exe
|
||||||
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
||||||
- cd grafana-enterprise
|
- cd grafana-enterprise
|
||||||
- git checkout master
|
- git checkout master
|
||||||
@ -2330,7 +2368,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- ./bin/grabpl verify-drone
|
- ./bin/grabpl verify-drone
|
||||||
- ./bin/grabpl verify-version v7.3.0-test
|
- ./bin/grabpl verify-version v7.3.0-test
|
||||||
@ -2435,7 +2473,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- ./bin/grabpl verify-drone
|
- ./bin/grabpl verify-drone
|
||||||
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
||||||
@ -2448,7 +2486,7 @@ steps:
|
|||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl lint-backend
|
- ./bin/grabpl lint-backend --edition oss
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -2480,8 +2518,8 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend --edition oss
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests --edition oss
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
@ -2523,6 +2561,20 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
|
- name: gen-version
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER}
|
||||||
|
depends_on:
|
||||||
|
- build-backend
|
||||||
|
- build-frontend
|
||||||
|
- build-plugins
|
||||||
|
- test-backend
|
||||||
|
- test-frontend
|
||||||
|
- codespell
|
||||||
|
- shellcheck
|
||||||
|
- check-dashboard-schemas
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
@ -2539,14 +2591,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -2581,6 +2626,7 @@ steps:
|
|||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
|
- ls dist/*.tar.gz*
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
@ -2688,7 +2734,7 @@ steps:
|
|||||||
image: grafana/ci-wix:0.1.1
|
image: grafana/ci-wix:0.1.1
|
||||||
commands:
|
commands:
|
||||||
- $$ProgressPreference = "SilentlyContinue"
|
- $$ProgressPreference = "SilentlyContinue"
|
||||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/windows/grabpl.exe -OutFile grabpl.exe
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/windows/grabpl.exe -OutFile grabpl.exe
|
||||||
- .\grabpl.exe verify-drone
|
- .\grabpl.exe verify-drone
|
||||||
|
|
||||||
- name: build-windows-installer
|
- name: build-windows-installer
|
||||||
@ -2735,7 +2781,7 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/grabpl
|
||||||
- chmod +x bin/grabpl
|
- chmod +x bin/grabpl
|
||||||
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
||||||
- cd grafana-enterprise
|
- cd grafana-enterprise
|
||||||
@ -2766,7 +2812,7 @@ steps:
|
|||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl lint-backend
|
- ./bin/grabpl lint-backend --edition enterprise
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -2798,8 +2844,8 @@ steps:
|
|||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend --edition enterprise
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests --edition enterprise
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
@ -2841,6 +2887,50 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
|
- name: lint-backend-enterprise2
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl lint-backend --edition enterprise2
|
||||||
|
environment:
|
||||||
|
CGO_ENABLED: 1
|
||||||
|
depends_on:
|
||||||
|
- initialize
|
||||||
|
|
||||||
|
- name: test-backend-enterprise2
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
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
|
||||||
|
- lint-backend-enterprise2
|
||||||
|
|
||||||
|
- name: build-backend-enterprise2
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
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
|
||||||
|
image: grafana/build-container:1.3.0
|
||||||
|
commands:
|
||||||
|
- ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER}
|
||||||
|
depends_on:
|
||||||
|
- build-backend
|
||||||
|
- build-frontend
|
||||||
|
- build-plugins
|
||||||
|
- test-backend
|
||||||
|
- test-frontend
|
||||||
|
- codespell
|
||||||
|
- shellcheck
|
||||||
|
- check-dashboard-schemas
|
||||||
|
- build-backend-enterprise2
|
||||||
|
- test-backend-enterprise2
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
@ -2857,14 +2947,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -2901,6 +2984,7 @@ steps:
|
|||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
|
- ls dist/*.tar.gz*
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
@ -2968,38 +3052,10 @@ steps:
|
|||||||
- mysql-integration-tests
|
- mysql-integration-tests
|
||||||
- postgres-integration-tests
|
- postgres-integration-tests
|
||||||
|
|
||||||
- name: lint-backend-enterprise2
|
|
||||||
image: grafana/build-container:1.3.0
|
|
||||||
commands:
|
|
||||||
- ./bin/grabpl lint-backend --build-tags=enterprise2
|
|
||||||
environment:
|
|
||||||
CGO_ENABLED: 1
|
|
||||||
depends_on:
|
|
||||||
- initialize
|
|
||||||
|
|
||||||
- name: test-backend-enterprise2
|
|
||||||
image: grafana/build-container:1.3.0
|
|
||||||
commands:
|
|
||||||
- "[ $(grep FocusConvey -R pkg | wc -l) -eq \"0\" ] || exit 1"
|
|
||||||
- ./bin/grabpl test-backend --build-tags enterprise2
|
|
||||||
- ./bin/grabpl integration-tests --build-tags enterprise2
|
|
||||||
depends_on:
|
|
||||||
- initialize
|
|
||||||
- lint-backend-enterprise2
|
|
||||||
|
|
||||||
- name: build-backend-enterprise2
|
|
||||||
image: grafana/build-container:1.3.0
|
|
||||||
commands:
|
|
||||||
- ./bin/grabpl build-backend --jobs 8 --edition enterprise --build-tags enterprise2 --build-id ${DRONE_BUILD_NUMBER} --variants linux-x64 --no-pull-enterprise
|
|
||||||
depends_on:
|
|
||||||
- initialize
|
|
||||||
- lint-backend-enterprise2
|
|
||||||
- test-backend-enterprise2
|
|
||||||
|
|
||||||
- name: package-enterprise2
|
- name: package-enterprise2
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl package --jobs 8 --edition enterprise --build-tags enterprise2 --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-x64 --sign
|
- ./bin/grabpl package --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-x64 --sign
|
||||||
environment:
|
environment:
|
||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
@ -3012,14 +3068,7 @@ steps:
|
|||||||
GRAFANA_API_KEY:
|
GRAFANA_API_KEY:
|
||||||
from_secret: grafana_api_key
|
from_secret: grafana_api_key
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-backend-enterprise2
|
- gen-version
|
||||||
- build-frontend
|
|
||||||
- build-plugins
|
|
||||||
- test-backend-enterprise2
|
|
||||||
- test-frontend
|
|
||||||
- codespell
|
|
||||||
- shellcheck
|
|
||||||
- check-dashboard-schemas
|
|
||||||
|
|
||||||
- name: end-to-end-tests-server-enterprise2
|
- name: end-to-end-tests-server-enterprise2
|
||||||
image: grafana/build-container:1.3.0
|
image: grafana/build-container:1.3.0
|
||||||
@ -3046,7 +3095,7 @@ steps:
|
|||||||
- name: upload-packages-enterprise2
|
- name: upload-packages-enterprise2
|
||||||
image: grafana/grafana-ci-deploy:1.2.7
|
image: grafana/grafana-ci-deploy:1.2.7
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl upload-packages --edition enterprise --build-tags enterprise2 --packages-bucket grafana-downloads-enterprise2
|
- ./bin/grabpl upload-packages --edition enterprise2 --packages-bucket grafana-downloads-enterprise2
|
||||||
environment:
|
environment:
|
||||||
GCP_GRAFANA_UPLOAD_KEY:
|
GCP_GRAFANA_UPLOAD_KEY:
|
||||||
from_secret: gcp_key
|
from_secret: gcp_key
|
||||||
@ -3099,7 +3148,7 @@ steps:
|
|||||||
image: grafana/ci-wix:0.1.1
|
image: grafana/ci-wix:0.1.1
|
||||||
commands:
|
commands:
|
||||||
- $$ProgressPreference = "SilentlyContinue"
|
- $$ProgressPreference = "SilentlyContinue"
|
||||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.30/windows/grabpl.exe -OutFile grabpl.exe
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.31/windows/grabpl.exe -OutFile grabpl.exe
|
||||||
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
||||||
- cd grafana-enterprise
|
- cd grafana-enterprise
|
||||||
- git checkout $$env:DRONE_BRANCH
|
- git checkout $$env:DRONE_BRANCH
|
||||||
|
164
scripts/lib.star
164
scripts/lib.star
@ -1,4 +1,4 @@
|
|||||||
grabpl_version = '0.5.30'
|
grabpl_version = '0.5.31'
|
||||||
build_image = 'grafana/build-container:1.3.0'
|
build_image = 'grafana/build-container:1.3.0'
|
||||||
publish_image = 'grafana/grafana-ci-deploy:1.2.7'
|
publish_image = 'grafana/grafana-ci-deploy:1.2.7'
|
||||||
grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2'
|
grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2'
|
||||||
@ -37,7 +37,7 @@ def pipeline(
|
|||||||
'depends_on': depends_on,
|
'depends_on': depends_on,
|
||||||
}
|
}
|
||||||
|
|
||||||
if edition == 'enterprise':
|
if edition in ('enterprise', 'enterprise2'):
|
||||||
# We have a custom clone step for enterprise
|
# We have a custom clone step for enterprise
|
||||||
pipeline['clone'] = {
|
pipeline['clone'] = {
|
||||||
'disable': True,
|
'disable': True,
|
||||||
@ -118,7 +118,7 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr
|
|||||||
'rm dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz',
|
'rm dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz',
|
||||||
'yarn install --frozen-lockfile --no-progress',
|
'yarn install --frozen-lockfile --no-progress',
|
||||||
])
|
])
|
||||||
if edition == 'enterprise':
|
if edition in ('enterprise', 'enterprise2'):
|
||||||
source_commit = ''
|
source_commit = ''
|
||||||
if ver_mode == 'release':
|
if ver_mode == 'release':
|
||||||
committish = '${DRONE_TAG}'
|
committish = '${DRONE_TAG}'
|
||||||
@ -184,7 +184,7 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr
|
|||||||
return steps
|
return steps
|
||||||
|
|
||||||
def enterprise_downstream_step(edition):
|
def enterprise_downstream_step(edition):
|
||||||
if edition == 'enterprise':
|
if edition in ('enterprise', 'enterprise2'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -205,13 +205,10 @@ def enterprise_downstream_step(edition):
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
def lint_backend_step(edition, build_tags=None):
|
def lint_backend_step(edition):
|
||||||
sfx = ''
|
sfx = ''
|
||||||
build_tags_str = ''
|
if edition == 'enterprise2':
|
||||||
if build_tags:
|
sfx = '-{}'.format(edition)
|
||||||
sfx = '-' + '-'.join(build_tags)
|
|
||||||
build_tags_str += ' --build-tags={}'.format(','.join(build_tags))
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'name': 'lint-backend' + sfx,
|
'name': 'lint-backend' + sfx,
|
||||||
'image': build_image,
|
'image': build_image,
|
||||||
@ -224,7 +221,7 @@ def lint_backend_step(edition, build_tags=None):
|
|||||||
],
|
],
|
||||||
'commands': [
|
'commands': [
|
||||||
# Don't use Make since it will re-download the linters
|
# Don't use Make since it will re-download the linters
|
||||||
'./bin/grabpl lint-backend{}'.format(build_tags_str),
|
'./bin/grabpl lint-backend --edition {}'.format(edition),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +253,7 @@ def ldap_service():
|
|||||||
}
|
}
|
||||||
|
|
||||||
def build_storybook_step(edition, ver_mode):
|
def build_storybook_step(edition, ver_mode):
|
||||||
if edition == 'enterprise' and ver_mode in ('release', 'test-release'):
|
if edition in ('enterprise', 'enterprise2') and ver_mode in ('release', 'test-release'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -276,7 +273,7 @@ def build_storybook_step(edition, ver_mode):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def publish_storybook_step(edition, ver_mode):
|
def publish_storybook_step(edition, ver_mode):
|
||||||
if edition == 'enterprise':
|
if edition in ('enterprise', 'enterprise2'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if ver_mode == 'test-release':
|
if ver_mode == 'test-release':
|
||||||
@ -312,16 +309,14 @@ def publish_storybook_step(edition, ver_mode):
|
|||||||
'commands': commands,
|
'commands': commands,
|
||||||
}
|
}
|
||||||
|
|
||||||
def build_backend_step(edition, ver_mode, variants=None, is_downstream=False, build_tags=None):
|
def build_backend_step(edition, ver_mode, variants=None, is_downstream=False):
|
||||||
variants_str = ''
|
variants_str = ''
|
||||||
if variants:
|
if variants:
|
||||||
variants_str = ' --variants {}'.format(','.join(variants))
|
variants_str = ' --variants {}'.format(','.join(variants))
|
||||||
|
|
||||||
build_tags_str = ''
|
|
||||||
sfx = ''
|
sfx = ''
|
||||||
if build_tags:
|
if edition == 'enterprise2':
|
||||||
build_tags_str = ' --build-tags {}'.format(','.join(build_tags))
|
sfx = '-{}'.format(edition)
|
||||||
sfx = '-' + '-'.join(build_tags)
|
|
||||||
|
|
||||||
# TODO: Convert number of jobs to percentage
|
# TODO: Convert number of jobs to percentage
|
||||||
if ver_mode == 'release':
|
if ver_mode == 'release':
|
||||||
@ -331,8 +326,8 @@ def build_backend_step(edition, ver_mode, variants=None, is_downstream=False, bu
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
cmds = [
|
cmds = [
|
||||||
'./bin/grabpl build-backend --jobs 8 --edition {}{} --github-token $${{GITHUB_TOKEN}} --no-pull-enterprise ${{DRONE_TAG}}'.format(
|
'./bin/grabpl build-backend --jobs 8 --edition {} --github-token $${{GITHUB_TOKEN}} --no-pull-enterprise ${{DRONE_TAG}}'.format(
|
||||||
edition, build_tags_str,
|
edition,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
elif ver_mode == 'test-release':
|
elif ver_mode == 'test-release':
|
||||||
@ -342,8 +337,8 @@ def build_backend_step(edition, ver_mode, variants=None, is_downstream=False, bu
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
cmds = [
|
cmds = [
|
||||||
'./bin/grabpl build-backend --jobs 8 --edition {}{} --github-token $${{GITHUB_TOKEN}} --no-pull-enterprise {}'.format(
|
'./bin/grabpl build-backend --jobs 8 --edition {} --github-token $${{GITHUB_TOKEN}} --no-pull-enterprise {}'.format(
|
||||||
edition, build_tags_str, test_release_ver,
|
edition, test_release_ver,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
@ -353,8 +348,8 @@ def build_backend_step(edition, ver_mode, variants=None, is_downstream=False, bu
|
|||||||
build_no = '$${SOURCE_BUILD_NUMBER}'
|
build_no = '$${SOURCE_BUILD_NUMBER}'
|
||||||
env = {}
|
env = {}
|
||||||
cmds = [
|
cmds = [
|
||||||
'./bin/grabpl build-backend --jobs 8 --edition {}{} --build-id {}{} --no-pull-enterprise'.format(
|
'./bin/grabpl build-backend --jobs 8 --edition {} --build-id {}{} --no-pull-enterprise'.format(
|
||||||
edition, build_tags_str, build_no, variants_str,
|
edition, build_no, variants_str,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -440,12 +435,10 @@ def build_plugins_step(edition, sign=False):
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
def test_backend_step(build_tags=None):
|
def test_backend_step(edition):
|
||||||
sfx = ''
|
sfx = ''
|
||||||
build_tags_str = ''
|
if edition == 'enterprise2':
|
||||||
if build_tags:
|
sfx = '-{}'.format(edition)
|
||||||
sfx = '-' + '-'.join(build_tags)
|
|
||||||
build_tags_str = ' --build-tags {}'.format(','.join(build_tags))
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'name': 'test-backend' + sfx,
|
'name': 'test-backend' + sfx,
|
||||||
@ -458,9 +451,9 @@ def test_backend_step(build_tags=None):
|
|||||||
# First make sure that there are no tests with FocusConvey
|
# First make sure that there are no tests with FocusConvey
|
||||||
'[ $(grep FocusConvey -R pkg | wc -l) -eq "0" ] || exit 1',
|
'[ $(grep FocusConvey -R pkg | wc -l) -eq "0" ] || exit 1',
|
||||||
# Then execute non-integration tests in parallel, since it should be safe
|
# Then execute non-integration tests in parallel, since it should be safe
|
||||||
'./bin/grabpl test-backend{}'.format(build_tags_str),
|
'./bin/grabpl test-backend --edition {}'.format(edition),
|
||||||
# Then execute integration tests in serial
|
# Then execute integration tests in serial
|
||||||
'./bin/grabpl integration-tests{}'.format(build_tags_str),
|
'./bin/grabpl integration-tests --edition {}'.format(edition),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -480,7 +473,7 @@ def test_frontend_step():
|
|||||||
}
|
}
|
||||||
|
|
||||||
def frontend_metrics_step(edition):
|
def frontend_metrics_step(edition):
|
||||||
if edition == 'enterprise':
|
if edition in ('enterprise', 'enterprise2'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -539,16 +532,53 @@ def dashboard_schemas_check():
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
def package_step(edition, ver_mode, variants=None, is_downstream=False, build_tags=None):
|
def gen_version_step(ver_mode, include_enterprise2=False, is_downstream=False):
|
||||||
|
deps = [
|
||||||
|
'build-backend',
|
||||||
|
'build-frontend',
|
||||||
|
'build-plugins',
|
||||||
|
'test-backend',
|
||||||
|
'test-frontend',
|
||||||
|
'codespell',
|
||||||
|
'shellcheck',
|
||||||
|
'check-dashboard-schemas',
|
||||||
|
]
|
||||||
|
if include_enterprise2:
|
||||||
|
sfx = '-enterprise2'
|
||||||
|
deps.extend([
|
||||||
|
'build-backend' + sfx,
|
||||||
|
'test-backend' + sfx,
|
||||||
|
])
|
||||||
|
|
||||||
|
if ver_mode == 'release':
|
||||||
|
args = '${DRONE_TAG}'
|
||||||
|
elif ver_mode == 'test-release':
|
||||||
|
args = test_release_ver
|
||||||
|
else:
|
||||||
|
if not is_downstream:
|
||||||
|
build_no = '${DRONE_BUILD_NUMBER}'
|
||||||
|
else:
|
||||||
|
build_no = '$${SOURCE_BUILD_NUMBER}'
|
||||||
|
args = '--build-id {}'.format(build_no)
|
||||||
|
|
||||||
|
return {
|
||||||
|
'name': 'gen-version',
|
||||||
|
'image': build_image,
|
||||||
|
'depends_on': deps,
|
||||||
|
'commands': [
|
||||||
|
'./bin/grabpl gen-version {}'.format(args),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def package_step(edition, ver_mode, variants=None, is_downstream=False):
|
||||||
variants_str = ''
|
variants_str = ''
|
||||||
if variants:
|
if variants:
|
||||||
variants_str = ' --variants {}'.format(','.join(variants))
|
variants_str = ' --variants {}'.format(','.join(variants))
|
||||||
|
|
||||||
build_tags_str = ''
|
|
||||||
sfx = ''
|
sfx = ''
|
||||||
if build_tags:
|
if edition == 'enterprise2':
|
||||||
build_tags_str = ' --build-tags {}'.format(','.join(build_tags))
|
sfx = '-{}'.format(edition)
|
||||||
sfx = '-' + '-'.join(build_tags)
|
|
||||||
|
|
||||||
if ver_mode in ('master', 'release', 'test-release', 'release-branch'):
|
if ver_mode in ('master', 'release', 'test-release', 'release-branch'):
|
||||||
sign_args = ' --sign'
|
sign_args = ' --sign'
|
||||||
@ -578,14 +608,14 @@ def package_step(edition, ver_mode, variants=None, is_downstream=False, build_ta
|
|||||||
# TODO: Use percentage for jobs
|
# TODO: Use percentage for jobs
|
||||||
if ver_mode == 'release':
|
if ver_mode == 'release':
|
||||||
cmds = [
|
cmds = [
|
||||||
'{}./bin/grabpl package --jobs 8 --edition {}{} '.format(test_args, edition, build_tags_str) + \
|
'{}./bin/grabpl package --jobs 8 --edition {} '.format(test_args, edition) + \
|
||||||
'--github-token $${{GITHUB_TOKEN}} --no-pull-enterprise{} ${{DRONE_TAG}}'.format(
|
'--github-token $${{GITHUB_TOKEN}} --no-pull-enterprise{} ${{DRONE_TAG}}'.format(
|
||||||
sign_args
|
sign_args
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
elif ver_mode == 'test-release':
|
elif ver_mode == 'test-release':
|
||||||
cmds = [
|
cmds = [
|
||||||
'{}./bin/grabpl package --jobs 8 --edition {}{} '.format(test_args, edition, build_tags_str) + \
|
'{}./bin/grabpl package --jobs 8 --edition {} '.format(test_args, edition) + \
|
||||||
'--github-token $${{GITHUB_TOKEN}} --no-pull-enterprise{} {}'.format(
|
'--github-token $${{GITHUB_TOKEN}} --no-pull-enterprise{} {}'.format(
|
||||||
sign_args, test_release_ver,
|
sign_args, test_release_ver,
|
||||||
),
|
),
|
||||||
@ -596,7 +626,7 @@ def package_step(edition, ver_mode, variants=None, is_downstream=False, build_ta
|
|||||||
else:
|
else:
|
||||||
build_no = '$${SOURCE_BUILD_NUMBER}'
|
build_no = '$${SOURCE_BUILD_NUMBER}'
|
||||||
cmds = [
|
cmds = [
|
||||||
'{}./bin/grabpl package --jobs 8 --edition {}{} '.format(test_args, edition, build_tags_str) + \
|
'{}./bin/grabpl package --jobs 8 --edition {} '.format(test_args, edition) + \
|
||||||
'--build-id {} --no-pull-enterprise{}{}'.format(build_no, variants_str, sign_args),
|
'--build-id {} --no-pull-enterprise{}{}'.format(build_no, variants_str, sign_args),
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -604,24 +634,19 @@ def package_step(edition, ver_mode, variants=None, is_downstream=False, build_ta
|
|||||||
'name': 'package' + sfx,
|
'name': 'package' + sfx,
|
||||||
'image': build_image,
|
'image': build_image,
|
||||||
'depends_on': [
|
'depends_on': [
|
||||||
'build-backend' + sfx,
|
# This step should have all the dependencies required for packaging, and should generate
|
||||||
'build-frontend',
|
# dist/grafana.version
|
||||||
'build-plugins',
|
'gen-version',
|
||||||
'test-backend' + sfx,
|
|
||||||
'test-frontend',
|
|
||||||
'codespell',
|
|
||||||
'shellcheck',
|
|
||||||
'check-dashboard-schemas',
|
|
||||||
],
|
],
|
||||||
'environment': env,
|
'environment': env,
|
||||||
'commands': cmds,
|
'commands': cmds,
|
||||||
}
|
}
|
||||||
|
|
||||||
def e2e_tests_server_step(edition, build_tags=None, port=3001):
|
def e2e_tests_server_step(edition, port=3001):
|
||||||
sfx = ''
|
sfx = ''
|
||||||
package_file_pfx = ''
|
package_file_pfx = ''
|
||||||
if build_tags:
|
if edition == 'enterprise2':
|
||||||
sfx = '-' + '-'.join(build_tags)
|
sfx = '-{}'.format(edition)
|
||||||
package_file_pfx = 'grafana' + sfx
|
package_file_pfx = 'grafana' + sfx
|
||||||
elif edition == 'enterprise':
|
elif edition == 'enterprise':
|
||||||
package_file_pfx = 'grafana-' + edition
|
package_file_pfx = 'grafana-' + edition
|
||||||
@ -646,10 +671,10 @@ def e2e_tests_server_step(edition, build_tags=None, port=3001):
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
def e2e_tests_step(build_tags=None, port=3001):
|
def e2e_tests_step(edition, port=3001):
|
||||||
sfx = ''
|
sfx = ''
|
||||||
if build_tags:
|
if edition == 'enterprise2':
|
||||||
sfx = '-' + '-'.join(build_tags)
|
sfx = '-{}'.format(edition)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'name': 'end-to-end-tests' + sfx,
|
'name': 'end-to-end-tests' + sfx,
|
||||||
@ -692,6 +717,7 @@ def copy_packages_for_docker_step():
|
|||||||
'package',
|
'package',
|
||||||
],
|
],
|
||||||
'commands': [
|
'commands': [
|
||||||
|
'ls dist/*.tar.gz*',
|
||||||
'cp dist/*.tar.gz* packaging/docker/',
|
'cp dist/*.tar.gz* packaging/docker/',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@ -775,7 +801,7 @@ def mysql_integration_tests_step():
|
|||||||
}
|
}
|
||||||
|
|
||||||
def release_canary_npm_packages_step(edition):
|
def release_canary_npm_packages_step(edition):
|
||||||
if edition == 'enterprise':
|
if edition in ('enterprise', 'enterprise2'):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -814,23 +840,21 @@ def deploy_to_kubernetes_step(edition, is_downstream=False):
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
def upload_packages_step(edition, ver_mode, is_downstream=False, build_tags=None):
|
def upload_packages_step(edition, ver_mode, is_downstream=False):
|
||||||
if ver_mode == 'master' and edition == 'enterprise' and not is_downstream:
|
if ver_mode == 'master' and edition in ('enterprise', 'enterprise2') and not is_downstream:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
build_tags_str = ''
|
|
||||||
sfx = ''
|
sfx = ''
|
||||||
packages_bucket = ''
|
packages_bucket = ''
|
||||||
if build_tags:
|
if edition == 'enterprise2':
|
||||||
build_tags_str = ' --build-tags {}'.format(','.join(build_tags))
|
sfx = '-{}'.format(edition)
|
||||||
sfx = '-' + '-'.join(build_tags)
|
|
||||||
packages_bucket = ' --packages-bucket grafana-downloads' + sfx
|
packages_bucket = ' --packages-bucket grafana-downloads' + sfx
|
||||||
|
|
||||||
if ver_mode == 'test-release':
|
if ver_mode == 'test-release':
|
||||||
cmd = './bin/grabpl upload-packages --edition {}{} '.format(edition, build_tags_str) + \
|
cmd = './bin/grabpl upload-packages --edition {} '.format(edition) + \
|
||||||
'--packages-bucket grafana-downloads-test'
|
'--packages-bucket grafana-downloads-test'
|
||||||
else:
|
else:
|
||||||
cmd = './bin/grabpl upload-packages --edition {}{}{}'.format(edition, build_tags_str, packages_bucket)
|
cmd = './bin/grabpl upload-packages --edition {}{}'.format(edition, packages_bucket)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'name': 'upload-packages' + sfx,
|
'name': 'upload-packages' + sfx,
|
||||||
@ -906,11 +930,11 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
|
|||||||
else:
|
else:
|
||||||
source_commit = ' $$env:SOURCE_COMMIT'
|
source_commit = ' $$env:SOURCE_COMMIT'
|
||||||
|
|
||||||
sfx = ''
|
|
||||||
if edition == 'enterprise':
|
|
||||||
sfx = '-enterprise'
|
|
||||||
init_cmds = []
|
init_cmds = []
|
||||||
if edition != 'enterprise':
|
sfx = ''
|
||||||
|
if edition in ('enterprise', 'enterprise2'):
|
||||||
|
sfx = '-{}'.format(edition)
|
||||||
|
else:
|
||||||
init_cmds.extend([
|
init_cmds.extend([
|
||||||
'$$ProgressPreference = "SilentlyContinue"',
|
'$$ProgressPreference = "SilentlyContinue"',
|
||||||
'Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v{}/windows/grabpl.exe -OutFile grabpl.exe'.format(grabpl_version),
|
'Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v{}/windows/grabpl.exe -OutFile grabpl.exe'.format(grabpl_version),
|
||||||
@ -923,7 +947,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
|
|||||||
'commands': init_cmds,
|
'commands': init_cmds,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
if (ver_mode == 'master' and (edition != 'enterprise' or is_downstream)) or ver_mode in (
|
if (ver_mode == 'master' and (edition not in ('enterprise', 'enterprise2') or is_downstream)) or ver_mode in (
|
||||||
'release', 'test-release', 'release-branch',
|
'release', 'test-release', 'release-branch',
|
||||||
):
|
):
|
||||||
bucket_part = ''
|
bucket_part = ''
|
||||||
@ -952,7 +976,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
|
|||||||
'rm gcpkey.json',
|
'rm gcpkey.json',
|
||||||
'cp C:\\App\\nssm-2.24.zip .',
|
'cp C:\\App\\nssm-2.24.zip .',
|
||||||
]
|
]
|
||||||
if (ver_mode == 'master' and (edition != 'enterprise' or is_downstream)) or ver_mode in (
|
if (ver_mode == 'master' and (edition not in ('enterprise', 'enterprise2') or is_downstream)) or ver_mode in (
|
||||||
'release', 'test-release',
|
'release', 'test-release',
|
||||||
):
|
):
|
||||||
installer_commands.extend([
|
installer_commands.extend([
|
||||||
@ -975,7 +999,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
if edition == 'enterprise':
|
if edition in ('enterprise', 'enterprise2'):
|
||||||
if ver_mode == 'release':
|
if ver_mode == 'release':
|
||||||
committish = '${DRONE_TAG}'
|
committish = '${DRONE_TAG}'
|
||||||
elif ver_mode == 'test-release':
|
elif ver_mode == 'test-release':
|
||||||
|
@ -10,6 +10,7 @@ load(
|
|||||||
'build_backend_step',
|
'build_backend_step',
|
||||||
'build_frontend_step',
|
'build_frontend_step',
|
||||||
'build_plugins_step',
|
'build_plugins_step',
|
||||||
|
'gen_version_step',
|
||||||
'package_step',
|
'package_step',
|
||||||
'e2e_tests_server_step',
|
'e2e_tests_server_step',
|
||||||
'e2e_tests_step',
|
'e2e_tests_step',
|
||||||
@ -37,21 +38,36 @@ ver_mode = 'master'
|
|||||||
|
|
||||||
def get_steps(edition, is_downstream=False):
|
def get_steps(edition, is_downstream=False):
|
||||||
publish = edition != 'enterprise' or is_downstream
|
publish = edition != 'enterprise' or is_downstream
|
||||||
|
include_enterprise2 = edition == 'enterprise'
|
||||||
steps = [
|
steps = [
|
||||||
enterprise_downstream_step(edition=edition),
|
enterprise_downstream_step(edition=edition),
|
||||||
lint_backend_step(edition=edition),
|
lint_backend_step(edition=edition),
|
||||||
codespell_step(),
|
codespell_step(),
|
||||||
shellcheck_step(),
|
shellcheck_step(),
|
||||||
dashboard_schemas_check(),
|
dashboard_schemas_check(),
|
||||||
test_backend_step(),
|
test_backend_step(edition=edition),
|
||||||
test_frontend_step(),
|
test_frontend_step(),
|
||||||
frontend_metrics_step(edition=edition),
|
frontend_metrics_step(edition=edition),
|
||||||
build_backend_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
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),
|
build_frontend_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
||||||
build_plugins_step(edition=edition, sign=True),
|
build_plugins_step(edition=edition, sign=True),
|
||||||
|
]
|
||||||
|
|
||||||
|
# Have to insert Enterprise2 steps before they're depended on (in the gen-version step)
|
||||||
|
if include_enterprise2:
|
||||||
|
edition2 = 'enterprise2'
|
||||||
|
steps.extend([
|
||||||
|
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),
|
||||||
|
])
|
||||||
|
|
||||||
|
# Insert remaining steps
|
||||||
|
steps.extend([
|
||||||
|
gen_version_step(ver_mode=ver_mode, is_downstream=is_downstream, include_enterprise2=include_enterprise2),
|
||||||
package_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
package_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
||||||
e2e_tests_server_step(edition=edition),
|
e2e_tests_server_step(edition=edition),
|
||||||
e2e_tests_step(),
|
e2e_tests_step(edition=edition),
|
||||||
build_storybook_step(edition=edition, ver_mode=ver_mode),
|
build_storybook_step(edition=edition, ver_mode=ver_mode),
|
||||||
publish_storybook_step(edition=edition, ver_mode=ver_mode),
|
publish_storybook_step(edition=edition, ver_mode=ver_mode),
|
||||||
build_frontend_docs_step(edition=edition),
|
build_frontend_docs_step(edition=edition),
|
||||||
@ -63,17 +79,14 @@ def get_steps(edition, is_downstream=False):
|
|||||||
release_canary_npm_packages_step(edition),
|
release_canary_npm_packages_step(edition),
|
||||||
upload_packages_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
upload_packages_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
||||||
deploy_to_kubernetes_step(edition=edition, is_downstream=is_downstream),
|
deploy_to_kubernetes_step(edition=edition, is_downstream=is_downstream),
|
||||||
]
|
])
|
||||||
if edition == 'enterprise':
|
if include_enterprise2:
|
||||||
build_tags = ['enterprise2']
|
edition2 = 'enterprise2'
|
||||||
steps.extend([
|
steps.extend([
|
||||||
lint_backend_step(edition=edition, build_tags=build_tags),
|
package_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64'], is_downstream=is_downstream),
|
||||||
test_backend_step(build_tags=build_tags),
|
e2e_tests_server_step(edition=edition2, port=3002),
|
||||||
build_backend_step(edition=edition, ver_mode=ver_mode, variants=['linux-x64'], is_downstream=is_downstream, build_tags=build_tags),
|
e2e_tests_step(edition=edition2, port=3002),
|
||||||
package_step(edition=edition, ver_mode=ver_mode, variants=['linux-x64'], is_downstream=is_downstream, build_tags=build_tags),
|
upload_packages_step(edition=edition2, ver_mode=ver_mode, is_downstream=is_downstream),
|
||||||
e2e_tests_server_step(edition=edition, build_tags=build_tags, port=3002),
|
|
||||||
e2e_tests_step(build_tags=build_tags, port=3002),
|
|
||||||
upload_packages_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream, build_tags=build_tags),
|
|
||||||
])
|
])
|
||||||
|
|
||||||
windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream)
|
windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream)
|
||||||
|
@ -10,6 +10,7 @@ load(
|
|||||||
'build_backend_step',
|
'build_backend_step',
|
||||||
'build_frontend_step',
|
'build_frontend_step',
|
||||||
'build_plugins_step',
|
'build_plugins_step',
|
||||||
|
'gen_version_step',
|
||||||
'package_step',
|
'package_step',
|
||||||
'e2e_tests_server_step',
|
'e2e_tests_server_step',
|
||||||
'e2e_tests_step',
|
'e2e_tests_step',
|
||||||
@ -30,19 +31,36 @@ ver_mode = 'pr'
|
|||||||
def pr_pipelines(edition):
|
def pr_pipelines(edition):
|
||||||
services = integration_test_services()
|
services = integration_test_services()
|
||||||
variants = ['linux-x64', 'linux-x64-musl', 'osx64', 'win64',]
|
variants = ['linux-x64', 'linux-x64-musl', 'osx64', 'win64',]
|
||||||
|
include_enterprise2 = edition == 'enterprise'
|
||||||
steps = [
|
steps = [
|
||||||
lint_backend_step(edition=edition),
|
lint_backend_step(edition=edition),
|
||||||
codespell_step(),
|
codespell_step(),
|
||||||
shellcheck_step(),
|
shellcheck_step(),
|
||||||
dashboard_schemas_check(),
|
dashboard_schemas_check(),
|
||||||
test_backend_step(),
|
test_backend_step(edition=edition),
|
||||||
test_frontend_step(),
|
test_frontend_step(),
|
||||||
build_backend_step(edition=edition, ver_mode=ver_mode, variants=variants),
|
build_backend_step(edition=edition, ver_mode=ver_mode, variants=variants),
|
||||||
build_frontend_step(edition=edition, ver_mode=ver_mode),
|
build_frontend_step(edition=edition, ver_mode=ver_mode),
|
||||||
build_plugins_step(edition=edition),
|
build_plugins_step(edition=edition),
|
||||||
|
]
|
||||||
|
|
||||||
|
# Have to insert Enterprise2 steps before they're depended on (in the gen-version step)
|
||||||
|
if include_enterprise2:
|
||||||
|
edition2 = 'enterprise2'
|
||||||
|
steps.append(benchmark_ldap_step())
|
||||||
|
services.append(ldap_service())
|
||||||
|
steps.extend([
|
||||||
|
lint_backend_step(edition=edition2),
|
||||||
|
test_backend_step(edition=edition2),
|
||||||
|
build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64']),
|
||||||
|
])
|
||||||
|
|
||||||
|
# Insert remaining steps
|
||||||
|
steps.extend([
|
||||||
|
gen_version_step(ver_mode=ver_mode, include_enterprise2=include_enterprise2),
|
||||||
package_step(edition=edition, ver_mode=ver_mode, variants=variants),
|
package_step(edition=edition, ver_mode=ver_mode, variants=variants),
|
||||||
e2e_tests_server_step(edition=edition),
|
e2e_tests_server_step(edition=edition),
|
||||||
e2e_tests_step(),
|
e2e_tests_step(edition=edition),
|
||||||
build_storybook_step(edition=edition, ver_mode=ver_mode),
|
build_storybook_step(edition=edition, ver_mode=ver_mode),
|
||||||
build_frontend_docs_step(edition=edition),
|
build_frontend_docs_step(edition=edition),
|
||||||
build_docs_website_step(),
|
build_docs_website_step(),
|
||||||
@ -50,18 +68,13 @@ def pr_pipelines(edition):
|
|||||||
build_docker_images_step(edition=edition, ver_mode=ver_mode, archs=['amd64',]),
|
build_docker_images_step(edition=edition, ver_mode=ver_mode, archs=['amd64',]),
|
||||||
postgres_integration_tests_step(),
|
postgres_integration_tests_step(),
|
||||||
mysql_integration_tests_step(),
|
mysql_integration_tests_step(),
|
||||||
]
|
])
|
||||||
if edition == 'enterprise':
|
|
||||||
steps.append(benchmark_ldap_step())
|
if include_enterprise2:
|
||||||
services.append(ldap_service())
|
|
||||||
build_tags = ['enterprise2']
|
|
||||||
steps.extend([
|
steps.extend([
|
||||||
lint_backend_step(edition=edition, build_tags=build_tags),
|
package_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64']),
|
||||||
test_backend_step(build_tags=build_tags),
|
e2e_tests_server_step(edition=edition2, port=3002),
|
||||||
build_backend_step(edition=edition, ver_mode=ver_mode, variants=['linux-x64'], build_tags=build_tags),
|
e2e_tests_step(edition=edition2, port=3002),
|
||||||
package_step(edition=edition, ver_mode=ver_mode, variants=['linux-x64'], build_tags=build_tags),
|
|
||||||
e2e_tests_server_step(edition=edition, build_tags=build_tags, port=3002),
|
|
||||||
e2e_tests_step(build_tags=build_tags, port=3002),
|
|
||||||
])
|
])
|
||||||
|
|
||||||
trigger = {
|
trigger = {
|
||||||
|
@ -13,6 +13,7 @@ load(
|
|||||||
'build_backend_step',
|
'build_backend_step',
|
||||||
'build_frontend_step',
|
'build_frontend_step',
|
||||||
'build_plugins_step',
|
'build_plugins_step',
|
||||||
|
'gen_version_step',
|
||||||
'package_step',
|
'package_step',
|
||||||
'e2e_tests_server_step',
|
'e2e_tests_server_step',
|
||||||
'e2e_tests_step',
|
'e2e_tests_step',
|
||||||
@ -59,27 +60,42 @@ def release_npm_packages_step(edition, ver_mode):
|
|||||||
def get_steps(edition, ver_mode):
|
def get_steps(edition, ver_mode):
|
||||||
should_publish = ver_mode in ('release', 'test-release',)
|
should_publish = ver_mode in ('release', 'test-release',)
|
||||||
should_upload = should_publish or ver_mode in ('release-branch',)
|
should_upload = should_publish or ver_mode in ('release-branch',)
|
||||||
|
include_enterprise2 = edition == 'enterprise'
|
||||||
|
|
||||||
steps = [
|
steps = [
|
||||||
lint_backend_step(edition=edition),
|
lint_backend_step(edition=edition),
|
||||||
codespell_step(),
|
codespell_step(),
|
||||||
shellcheck_step(),
|
shellcheck_step(),
|
||||||
dashboard_schemas_check(),
|
dashboard_schemas_check(),
|
||||||
test_backend_step(),
|
test_backend_step(edition=edition),
|
||||||
test_frontend_step(),
|
test_frontend_step(),
|
||||||
build_backend_step(edition=edition, ver_mode=ver_mode),
|
build_backend_step(edition=edition, ver_mode=ver_mode),
|
||||||
build_frontend_step(edition=edition, ver_mode=ver_mode),
|
build_frontend_step(edition=edition, ver_mode=ver_mode),
|
||||||
build_plugins_step(edition=edition, sign=True),
|
build_plugins_step(edition=edition, sign=True),
|
||||||
|
]
|
||||||
|
|
||||||
|
# Have to insert Enterprise2 steps before they're depended on (in the gen-version step)
|
||||||
|
if include_enterprise2:
|
||||||
|
edition2 = 'enterprise2'
|
||||||
|
steps.extend([
|
||||||
|
lint_backend_step(edition=edition2),
|
||||||
|
test_backend_step(edition=edition2),
|
||||||
|
build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64']),
|
||||||
|
])
|
||||||
|
|
||||||
|
# Insert remaining steps
|
||||||
|
steps.extend([
|
||||||
|
gen_version_step(ver_mode=ver_mode, include_enterprise2=include_enterprise2),
|
||||||
package_step(edition=edition, ver_mode=ver_mode),
|
package_step(edition=edition, ver_mode=ver_mode),
|
||||||
e2e_tests_server_step(edition=edition),
|
e2e_tests_server_step(edition=edition),
|
||||||
e2e_tests_step(),
|
e2e_tests_step(edition=edition),
|
||||||
build_storybook_step(edition=edition, ver_mode=ver_mode),
|
build_storybook_step(edition=edition, ver_mode=ver_mode),
|
||||||
copy_packages_for_docker_step(),
|
copy_packages_for_docker_step(),
|
||||||
build_docker_images_step(edition=edition, ver_mode=ver_mode, publish=should_publish),
|
build_docker_images_step(edition=edition, ver_mode=ver_mode, publish=should_publish),
|
||||||
build_docker_images_step(edition=edition, ver_mode=ver_mode, ubuntu=True, publish=should_publish),
|
build_docker_images_step(edition=edition, ver_mode=ver_mode, ubuntu=True, publish=should_publish),
|
||||||
postgres_integration_tests_step(),
|
postgres_integration_tests_step(),
|
||||||
mysql_integration_tests_step(),
|
mysql_integration_tests_step(),
|
||||||
]
|
])
|
||||||
if should_upload:
|
if should_upload:
|
||||||
steps.append(upload_packages_step(edition=edition, ver_mode=ver_mode))
|
steps.append(upload_packages_step(edition=edition, ver_mode=ver_mode))
|
||||||
if should_publish:
|
if should_publish:
|
||||||
@ -89,18 +105,15 @@ def get_steps(edition, ver_mode):
|
|||||||
])
|
])
|
||||||
windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode)
|
windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode)
|
||||||
|
|
||||||
if edition == 'enterprise':
|
if include_enterprise2:
|
||||||
build_tags = ['enterprise2']
|
edition2 = 'enterprise2'
|
||||||
steps.extend([
|
steps.extend([
|
||||||
lint_backend_step(edition=edition, build_tags=build_tags),
|
package_step(edition=edition2, ver_mode=ver_mode, variants=['linux-x64']),
|
||||||
test_backend_step(build_tags=build_tags),
|
e2e_tests_server_step(edition=edition2, port=3002),
|
||||||
build_backend_step(edition=edition, ver_mode=ver_mode, variants=['linux-x64'], build_tags=build_tags),
|
e2e_tests_step(edition=edition2, port=3002),
|
||||||
package_step(edition=edition, ver_mode=ver_mode, variants=['linux-x64'], build_tags=build_tags),
|
|
||||||
e2e_tests_server_step(edition=edition, build_tags=build_tags, port=3002),
|
|
||||||
e2e_tests_step(build_tags=build_tags, port=3002),
|
|
||||||
])
|
])
|
||||||
if should_upload:
|
if should_upload:
|
||||||
steps.append(upload_packages_step(edition=edition, ver_mode=ver_mode, build_tags=build_tags))
|
steps.append(upload_packages_step(edition=edition2, ver_mode=ver_mode))
|
||||||
|
|
||||||
return steps, windows_steps
|
return steps, windows_steps
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user