diff --git a/.drone.star b/.drone.star index d2723f88be8..0829f79f299 100644 --- a/.drone.star +++ b/.drone.star @@ -14,7 +14,7 @@ load('scripts/drone/vault.star', 'secrets') def main(ctx): edition = 'oss' - return pr_pipelines(edition=edition) + docs_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \ + return pr_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \ publish_image_pipelines('public') + publish_image_pipelines('security') + \ publish_artifacts_pipelines('security') + publish_artifacts_pipelines('public') + \ publish_npm_pipelines('public') + publish_packages_pipeline() + \ diff --git a/.drone.yml b/.drone.yml index a0b640c43f4..95800b08066 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -23,7 +23,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl verify-drone @@ -43,13 +43,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition oss @@ -57,7 +57,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -67,19 +67,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition oss depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition oss depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -87,7 +87,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-frontend trigger: event: @@ -113,7 +113,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -125,7 +125,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} @@ -133,7 +133,7 @@ steps: depends_on: - initialize environment: {} - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id @@ -142,20 +142,29 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps depends_on: - initialize environment: null - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# Make sure the git tree is clean.' @@ -176,7 +185,7 @@ steps: - git stash pop depends_on: - validate-scuemata - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --jobs 8 --edition oss @@ -185,8 +194,9 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages environment: null - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: package - commands: - ./scripts/grafana-server/start-server @@ -194,11 +204,12 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -241,9 +252,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - yarn wait-on http://$HOST:$PORT @@ -263,7 +275,7 @@ steps: - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition oss -archs amd64 @@ -321,7 +333,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -333,7 +345,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -348,7 +360,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -363,7 +375,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: mysql-integration-tests trigger: event: @@ -395,7 +407,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -407,22 +419,44 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id - ${DRONE_BUILD_NUMBER} --no-pull-enterprise + - |- + echo -e "unknwon + referer + errorstring + eror + iam + wan" > words_to_ignore.txt + - codespell -I words_to_ignore.txt docs/ + - rm words_to_ignore.txt + depends_on: + - initialize + image: grafana/build-container:1.5.3 + name: codespell +- commands: + - yarn run prettier:checkDocs depends_on: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.4.9 - name: build-frontend + image: grafana/build-container:1.5.3 + name: lint-docs +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./scripts/ci-reference-docs-lint.sh ci depends_on: - - build-frontend - image: grafana/build-container:1.4.9 + - build-frontend-packages + image: grafana/build-container:1.5.3 name: build-frontend-docs - commands: - mkdir -p /hugo/content/docs/grafana @@ -447,7 +481,7 @@ volumes: --- depends_on: [] kind: pipeline -name: main-test +name: main-docs node: type: no-parallel platform: @@ -457,7 +491,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -469,7 +503,88 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 + name: initialize +- commands: + - |- + echo -e "unknwon + referer + errorstring + eror + iam + wan" > words_to_ignore.txt + - codespell -I words_to_ignore.txt docs/ + - rm words_to_ignore.txt + depends_on: + - initialize + image: grafana/build-container:1.5.3 + name: codespell +- commands: + - yarn run prettier:checkDocs + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: lint-docs +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages +- commands: + - ./scripts/ci-reference-docs-lint.sh ci + depends_on: + - build-frontend-packages + image: grafana/build-container:1.5.3 + name: build-frontend-docs +- commands: + - mkdir -p /hugo/content/docs/grafana + - cp -r docs/sources/* /hugo/content/docs/grafana/latest/ + - cd /hugo && make prod + depends_on: + - build-frontend-docs + image: grafana/docs-base:latest + name: build-docs-website +trigger: + branch: main + event: + - push +type: docker +volumes: +- host: + path: /var/run/docker.sock + name: docker +--- +depends_on: [] +kind: pipeline +name: main-test +node: + type: no-parallel +platform: + arch: amd64 + os: linux +services: [] +steps: +- commands: + - mkdir -p bin + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl + - chmod +x bin/grabpl + image: byrnedo/alpine-curl:0.1.8 + name: grabpl +- commands: + - echo $DRONE_RUNNER_NAME + image: alpine:3.15 + name: identify-runner +- commands: + - make gen-go + - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} + - yarn install --immutable + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl verify-drone @@ -489,13 +604,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition oss @@ -503,7 +618,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -513,19 +628,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition oss depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition oss depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -533,7 +648,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-frontend trigger: branch: main @@ -557,7 +672,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -569,7 +684,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - image: grafana/drone-downstream name: trigger-enterprise-downstream @@ -588,7 +703,7 @@ steps: depends_on: - initialize environment: {} - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id @@ -597,8 +712,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin depends_on: @@ -606,13 +730,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# Make sure the git tree is clean.' @@ -633,7 +757,7 @@ steps: - git stash pop depends_on: - validate-scuemata - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise @@ -642,6 +766,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages environment: GITHUB_TOKEN: from_secret: github_token @@ -653,7 +778,7 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: package - commands: - ./scripts/grafana-server/start-server @@ -661,11 +786,12 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -708,9 +834,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - printenv GCP_KEY | base64 -d > /tmp/gcpkey.json @@ -750,20 +877,14 @@ steps: GRAFANA_MISC_STATS_API_KEY: from_secret: grafana_misc_stats_api_key failure: ignore - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: publish-frontend-metrics -- commands: - - ./scripts/ci-reference-docs-lint.sh ci - depends_on: - - build-frontend - image: grafana/build-container:1.4.9 - name: build-frontend-docs - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition oss @@ -835,7 +956,7 @@ steps: environment: GITHUB_PACKAGE_TOKEN: from_secret: github_package_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: release-canary-npm-packages - commands: - ./bin/grabpl upload-packages --edition oss --packages-bucket grafana-downloads @@ -910,7 +1031,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -922,7 +1043,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -937,7 +1058,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -952,7 +1073,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: mysql-integration-tests trigger: branch: main @@ -988,7 +1109,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -1043,7 +1164,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1053,7 +1174,7 @@ steps: name: identify-runner - commands: - make gen-go - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl store-packages --edition oss --gcp-key /tmp/gcpkey.json --build-id @@ -1125,7 +1246,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1138,7 +1259,7 @@ steps: - ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl gen-version ${DRONE_TAG} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} @@ -1148,7 +1269,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps @@ -1157,8 +1278,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --github-token $${GITHUB_TOKEN} + --edition oss --no-pull-enterprise ${DRONE_TAG} + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin depends_on: @@ -1166,13 +1296,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# Make sure the git tree is clean.' @@ -1193,7 +1323,7 @@ steps: - git stash pop depends_on: - validate-scuemata - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl package --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise @@ -1202,6 +1332,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages environment: GITHUB_TOKEN: from_secret: github_token @@ -1213,14 +1344,14 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: package - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition oss --shouldSave @@ -1252,11 +1383,12 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -1299,9 +1431,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - ./bin/grabpl upload-cdn --edition oss --src-bucket "$${PRERELEASE_BUCKET}" --src-dir @@ -1351,7 +1484,7 @@ steps: - ./scripts/build/build-npm-packages.sh ${DRONE_TAG} depends_on: - store-storybook - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-npm-packages - commands: - ./bin/grabpl artifacts npm store --tag ${DRONE_TAG} @@ -1397,7 +1530,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1410,7 +1543,7 @@ steps: - ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl gen-version ${DRONE_TAG} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - |- @@ -1424,13 +1557,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition oss @@ -1438,7 +1571,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -1448,19 +1581,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition oss depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition oss depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -1468,7 +1601,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-frontend trigger: event: @@ -1517,7 +1650,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1530,7 +1663,7 @@ steps: - ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl gen-version ${DRONE_TAG} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -1545,7 +1678,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -1560,7 +1693,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: mysql-integration-tests trigger: event: @@ -1601,7 +1734,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -1660,7 +1793,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1675,7 +1808,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -1695,7 +1828,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} @@ -1705,7 +1838,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps @@ -1714,8 +1847,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --github-token $${GITHUB_TOKEN} + --edition enterprise --no-pull-enterprise ${DRONE_TAG} + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin @@ -1724,13 +1866,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# Make sure the git tree is clean.' @@ -1751,7 +1893,7 @@ steps: - git stash pop depends_on: - validate-scuemata - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --github-token $${GITHUB_TOKEN} @@ -1761,7 +1903,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-backend-enterprise2 - commands: - ./bin/grabpl package --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} @@ -1770,6 +1912,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages - build-backend-enterprise2 environment: GITHUB_TOKEN: @@ -1782,14 +1925,14 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: package - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition enterprise --shouldSave @@ -1821,12 +1964,13 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 RUNDIR: scripts/grafana-server/tmp-grafana-enterprise - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -1894,6 +2038,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages - build-backend-enterprise2 environment: GITHUB_TOKEN: @@ -1906,7 +2051,7 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: package-enterprise2 - commands: - ./bin/grabpl upload-cdn --edition enterprise2 --src-bucket "$${PRERELEASE_BUCKET}" @@ -1968,7 +2113,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1983,7 +2128,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -2003,7 +2148,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - |- @@ -2017,13 +2162,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition enterprise @@ -2031,7 +2176,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -2041,19 +2186,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition enterprise depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition enterprise depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -2061,7 +2206,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-frontend - commands: - ./bin/grabpl lint-backend --edition enterprise2 @@ -2069,19 +2214,19 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-backend-enterprise2 - commands: - ./bin/grabpl test-backend --edition enterprise2 depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-enterprise2 - commands: - ./bin/grabpl integration-tests --edition enterprise2 depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-integration-enterprise2 trigger: event: @@ -2140,7 +2285,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2155,7 +2300,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -2175,7 +2320,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -2190,7 +2335,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -2205,7 +2350,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: mysql-integration-tests - commands: - dockerize -wait tcp://redis:6379/0 -timeout 120s @@ -2214,7 +2359,7 @@ steps: - initialize environment: REDIS_URL: redis://redis:6379/0 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: redis-integration-tests - commands: - dockerize -wait tcp://memcached:11211 -timeout 120s @@ -2223,7 +2368,7 @@ steps: - initialize environment: MEMCACHED_HOSTS: memcached:11211 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: memcached-integration-tests trigger: event: @@ -2268,7 +2413,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -2343,7 +2488,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2421,7 +2566,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2482,7 +2627,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2561,7 +2706,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2623,7 +2768,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2659,7 +2804,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2702,11 +2847,11 @@ steps: - ./bin/grabpl verify-version ${DRONE_TAG} - ./bin/grabpl gen-version ${DRONE_TAG} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2728,7 +2873,7 @@ steps: environment: NPM_TOKEN: from_secret: npm_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: release-npm-packages trigger: event: @@ -2754,7 +2899,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2817,7 +2962,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2829,7 +2974,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} @@ -2837,7 +2982,7 @@ steps: depends_on: - initialize environment: {} - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id @@ -2846,8 +2991,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} + --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin depends_on: @@ -2855,13 +3009,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# Make sure the git tree is clean.' @@ -2882,7 +3036,7 @@ steps: - git stash pop depends_on: - validate-scuemata - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise @@ -2891,6 +3045,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages environment: GITHUB_TOKEN: from_secret: github_token @@ -2902,14 +3057,14 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: package - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition oss --shouldSave @@ -2941,11 +3096,12 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -2988,9 +3144,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - ./bin/grabpl upload-cdn --edition oss --src-bucket "grafana-static-assets" @@ -3044,7 +3201,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3056,7 +3213,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - |- @@ -3070,13 +3227,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition oss @@ -3084,7 +3241,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -3094,19 +3251,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition oss depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition oss depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -3114,7 +3271,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-frontend trigger: ref: @@ -3157,7 +3314,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3169,7 +3326,7 @@ steps: - make gen-go - ./bin/grabpl gen-version --build-id ${DRONE_BUILD_NUMBER} - yarn install --immutable - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -3184,7 +3341,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -3199,7 +3356,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: mysql-integration-tests trigger: ref: @@ -3234,7 +3391,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -3282,7 +3439,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3297,7 +3454,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -3313,7 +3470,7 @@ steps: depends_on: - clone-enterprise environment: {} - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER} @@ -3321,7 +3478,7 @@ steps: depends_on: - initialize environment: {} - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-backend - commands: - ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition enterprise --build-id @@ -3330,8 +3487,17 @@ steps: - initialize environment: NODE_OPTIONS: --max_old_space_size=8192 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-frontend +- commands: + - ./bin/grabpl build-frontend-packages --jobs 8 --edition enterprise --build-id + ${DRONE_BUILD_NUMBER} --no-pull-enterprise + depends_on: + - initialize + environment: + NODE_OPTIONS: --max_old_space_size=8192 + image: grafana/build-container:1.5.3 + name: build-frontend-packages - commands: - ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin @@ -3340,13 +3506,13 @@ steps: environment: GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-plugins - commands: - ./bin/linux-amd64/grafana-cli cue validate-schema --grafana-root . depends_on: - build-backend - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: validate-scuemata - commands: - '# Make sure the git tree is clean.' @@ -3367,7 +3533,7 @@ steps: - git stash pop depends_on: - validate-scuemata - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: ensure-cuetsified - commands: - ./bin/grabpl build-backend --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER} @@ -3375,7 +3541,7 @@ steps: depends_on: - initialize environment: {} - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-backend-enterprise2 - commands: - ./bin/grabpl package --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER} @@ -3384,6 +3550,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages - build-backend-enterprise2 environment: GITHUB_TOKEN: @@ -3396,14 +3563,14 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: package - commands: - ls dist/*.tar.gz* - cp dist/*.tar.gz* packaging/docker/ depends_on: - package - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: copy-packages-for-docker - commands: - ./bin/grabpl build-docker --edition enterprise --shouldSave @@ -3435,12 +3602,13 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages detach: true environment: ARCH: linux-amd64 PORT: 3001 RUNDIR: scripts/grafana-server/tmp-grafana-enterprise - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: grafana-server - commands: - apt-get install -y netcat @@ -3483,9 +3651,10 @@ steps: - ./bin/grabpl verify-storybook depends_on: - build-frontend + - build-frontend-packages environment: NODE_OPTIONS: --max_old_space_size=4096 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: build-storybook - commands: - ./bin/grabpl upload-cdn --edition enterprise --src-bucket "grafana-static-assets" @@ -3516,6 +3685,7 @@ steps: - build-plugins - build-backend - build-frontend + - build-frontend-packages - build-backend-enterprise2 environment: GITHUB_TOKEN: @@ -3528,7 +3698,7 @@ steps: from_secret: gpg_pub_key GRAFANA_API_KEY: from_secret: grafana_api_key - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: package-enterprise2 - commands: - ./bin/grabpl upload-cdn --edition enterprise2 --src-bucket "grafana-static-assets" @@ -3583,7 +3753,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3598,7 +3768,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -3614,7 +3784,7 @@ steps: depends_on: - clone-enterprise environment: {} - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - |- @@ -3628,13 +3798,13 @@ steps: - rm words_to_ignore.txt depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: codespell - commands: - ./bin/grabpl shellcheck depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: shellcheck - commands: - ./bin/grabpl lint-backend --edition enterprise @@ -3642,7 +3812,7 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-backend - commands: - yarn run prettier:check @@ -3652,19 +3822,19 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-frontend - commands: - ./bin/grabpl test-backend --edition enterprise depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend - commands: - ./bin/grabpl integration-tests --edition enterprise depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-integration - commands: - yarn run ci:test-frontend @@ -3672,7 +3842,7 @@ steps: - initialize environment: TEST_MAX_WORKERS: 50% - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-frontend - commands: - ./bin/grabpl lint-backend --edition enterprise2 @@ -3680,19 +3850,19 @@ steps: - initialize environment: CGO_ENABLED: "1" - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: lint-backend-enterprise2 - commands: - ./bin/grabpl test-backend --edition enterprise2 depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-enterprise2 - commands: - ./bin/grabpl integration-tests --edition enterprise2 depends_on: - initialize - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: test-backend-integration-enterprise2 trigger: ref: @@ -3745,7 +3915,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3760,7 +3930,7 @@ steps: environment: GITHUB_TOKEN: from_secret: github_token - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: clone-enterprise - commands: - mv bin/grabpl /tmp/ @@ -3776,7 +3946,7 @@ steps: depends_on: - clone-enterprise environment: {} - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: initialize - commands: - apt-get update @@ -3791,7 +3961,7 @@ steps: GRAFANA_TEST_DB: postgres PGPASSWORD: grafanatest POSTGRES_HOST: postgres - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: postgres-integration-tests - commands: - apt-get update @@ -3806,7 +3976,7 @@ steps: environment: GRAFANA_TEST_DB: mysql MYSQL_HOST: mysql - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: mysql-integration-tests - commands: - dockerize -wait tcp://redis:6379/0 -timeout 120s @@ -3815,7 +3985,7 @@ steps: - initialize environment: REDIS_URL: redis://redis:6379/0 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: redis-integration-tests - commands: - dockerize -wait tcp://memcached:11211 -timeout 120s @@ -3824,7 +3994,7 @@ steps: - initialize environment: MEMCACHED_HOSTS: memcached:11211 - image: grafana/build-container:1.4.9 + image: grafana/build-container:1.5.3 name: memcached-integration-tests trigger: ref: @@ -3863,7 +4033,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.7/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -3975,6 +4145,6 @@ kind: secret name: prerelease_bucket --- kind: signature -hmac: a39cc6926bbf02f091f7867ea09f2f818d83451aa1125955f6993a5bc1bf7c10 +hmac: 7ad7687ab8c91a3f765fa2137b62fc9be62173705760402a485735895173c33c ... diff --git a/Dockerfile b/Dockerfile index 44e1179bd6f..152b26ab06c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ COPY emails emails ENV NODE_ENV production RUN yarn build -FROM golang:1.17.7-alpine3.15 as go-builder +FROM golang:1.17.8-alpine3.15 as go-builder RUN apk add --no-cache gcc g++ make diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 4bcf1a82894..4d7252de6da 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -21,7 +21,7 @@ COPY emails emails ENV NODE_ENV production RUN yarn build -FROM golang:1.17.7 AS go-builder +FROM golang:1.17.8 AS go-builder WORKDIR /src/grafana diff --git a/package.json b/package.json index 4eff2186d01..96d3b57f90a 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "packages:clean": "lerna run clean", "precommit": "yarn run lint-staged", "prettier:check": "prettier --list-different \"**/*.{scss,md,mdx}\"", + "prettier:checkDocs": "prettier --check --list-different=false --loglevel=warn \"docs/**.md\" \"packages/**.{ts,tsx,scss,md,mdx}\"", "prettier:write": "prettier --list-different \"**/*.{scss,md,mdx}\" --write", "start": "yarn themes:generate && webpack --progress --color --watch --env noTsCheck=0 --config scripts/webpack/webpack.dev.js", "start:hot": "yarn themes:generate && webpack serve --progress --color --config scripts/webpack/webpack.hot.js", diff --git a/scripts/build/ci-build/Dockerfile b/scripts/build/ci-build/Dockerfile index 6f56ca72761..1840ec533e2 100644 --- a/scripts/build/ci-build/Dockerfile +++ b/scripts/build/ci-build/Dockerfile @@ -110,7 +110,7 @@ RUN rm dockerize-linux-amd64-v${DOCKERIZE_VERSION}.tar.gz # Use old Debian (this has support into 2022) in order to ensure binary compatibility with older glibc's. FROM debian:stretch-20210208 -ENV GOVERSION=1.17.7 \ +ENV GOVERSION=1.17.8 \ PATH=/usr/local/go/bin:$PATH \ GOPATH=/go \ NODEVERSION=16.13.0-1nodesource1 \ diff --git a/scripts/drone/pipelines/docs.star b/scripts/drone/pipelines/docs.star index 2bbe1088a26..fc6ce20cfa7 100644 --- a/scripts/drone/pipelines/docs.star +++ b/scripts/drone/pipelines/docs.star @@ -1,14 +1,14 @@ load( 'scripts/drone/steps/lib.star', + 'build_image', 'initialize_step', 'download_grabpl_step', 'lint_frontend_step', 'codespell_step', - 'shellcheck_step', - 'build_frontend_step', 'test_frontend_step', 'build_storybook_step', 'build_frontend_docs_step', + 'build_frontend_package_step', 'build_docs_website_step', ) @@ -23,22 +23,42 @@ load( 'pipeline', ) -ver_mode = 'pr' -def docs_pipelines(edition): +def docs_pipelines(edition, ver_mode, trigger): steps = [download_grabpl_step()] + initialize_step(edition, platform='linux', ver_mode=ver_mode) - steps.extend([ - build_frontend_step(edition=edition, ver_mode=ver_mode), - ]) # Insert remaining steps steps.extend([ + codespell_step(), + lint_docs(), + build_frontend_package_step(edition=edition, ver_mode=ver_mode), build_frontend_docs_step(edition=edition), build_docs_website_step(), ]) - trigger = { - 'event': [ + return pipeline( + name='{}-docs'.format(ver_mode), edition=edition, trigger=trigger, services=[], steps=steps, + ) + +def lint_docs(): + return { + 'name': 'lint-docs', + 'image': build_image, + 'depends_on': [ + 'initialize', + ], + 'environment': { + 'NODE_OPTIONS': '--max_old_space_size=8192', + }, + 'commands': [ + 'yarn run prettier:checkDocs', + ], + } + + +def trigger_docs(): + return { + 'event': [ 'pull_request', ], 'paths': { @@ -48,8 +68,3 @@ def docs_pipelines(edition): ], }, } - return [ - pipeline( - name='pr-docs', edition=edition, trigger=trigger, services=[], steps=steps, - ), - ] diff --git a/scripts/drone/pipelines/main.star b/scripts/drone/pipelines/main.star index 420de691ba7..781a8d81cca 100644 --- a/scripts/drone/pipelines/main.star +++ b/scripts/drone/pipelines/main.star @@ -12,12 +12,12 @@ load( 'test_frontend_step', 'build_backend_step', 'build_frontend_step', + 'build_frontend_package_step', 'build_plugins_step', 'package_step', 'grafana_server_step', 'e2e_tests_step', 'build_storybook_step', - 'build_frontend_docs_step', 'copy_packages_for_docker_step', 'build_docker_images_step', 'publish_images_step', @@ -52,6 +52,11 @@ load( 'notify_pipeline', ) +load( + 'scripts/drone/pipelines/docs.star', + 'docs_pipelines', +) + ver_mode = 'main' def get_steps(edition, is_downstream=False): @@ -72,6 +77,7 @@ def get_steps(edition, is_downstream=False): enterprise_downstream_step(edition=edition), 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_package_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream), build_plugins_step(edition=edition, sign=True), validate_scuemata_step(), ensure_cuetsified_step(), @@ -106,7 +112,6 @@ def get_steps(edition, is_downstream=False): store_storybook_step(edition=edition, ver_mode=ver_mode), test_a11y_frontend_step(ver_mode=ver_mode, edition=edition), frontend_metrics_step(edition=edition), - build_frontend_docs_step(edition=edition), copy_packages_for_docker_step(), build_docker_images_step(edition=edition, ver_mode=ver_mode, publish=False), build_docker_images_step(edition=edition, ver_mode=ver_mode, ubuntu=True, publish=False), @@ -155,6 +160,7 @@ def main_pipelines(edition): integration_test_steps.append(benchmark_ldap_step()) pipelines = [ + docs_pipelines(edition, ver_mode, trigger), pipeline( name='main-test', edition=edition, trigger=trigger, services=[], steps=[download_grabpl_step()] + initialize_step(edition, platform='linux', ver_mode=ver_mode) + test_steps, diff --git a/scripts/drone/pipelines/pr.star b/scripts/drone/pipelines/pr.star index 8b9552b6ca4..d44f2dfb275 100644 --- a/scripts/drone/pipelines/pr.star +++ b/scripts/drone/pipelines/pr.star @@ -9,6 +9,7 @@ load( 'shellcheck_step', 'build_backend_step', 'build_frontend_step', + 'build_frontend_package_step', 'build_plugins_step', 'test_backend_step', 'test_backend_integration_step', @@ -42,6 +43,12 @@ load( 'pipeline', ) +load( + 'scripts/drone/pipelines/docs.star', + 'docs_pipelines', + 'trigger_docs', +) + ver_mode = 'pr' def pr_pipelines(edition): @@ -62,6 +69,7 @@ def pr_pipelines(edition): build_steps = [ build_backend_step(edition=edition, ver_mode=ver_mode, variants=variants), build_frontend_step(edition=edition, ver_mode=ver_mode), + build_frontend_package_step(edition=edition, ver_mode=ver_mode), build_plugins_step(edition=edition), validate_scuemata_step(), ensure_cuetsified_step(), @@ -129,5 +137,5 @@ def pr_pipelines(edition): name='pr-integration-tests', edition=edition, trigger=trigger, services=services, steps=[download_grabpl_step()] + initialize_step(edition, platform='linux', ver_mode=ver_mode) + integration_test_steps, volumes=volumes, - ), + ), docs_pipelines(edition, ver_mode, trigger_docs()) ] diff --git a/scripts/drone/pipelines/release.star b/scripts/drone/pipelines/release.star index 60f8e778e39..767c64f1967 100644 --- a/scripts/drone/pipelines/release.star +++ b/scripts/drone/pipelines/release.star @@ -15,6 +15,7 @@ load( 'test_frontend_step', 'build_backend_step', 'build_frontend_step', + 'build_frontend_package_step', 'build_plugins_step', 'package_step', 'grafana_server_step', @@ -175,6 +176,7 @@ def get_steps(edition, ver_mode): build_steps = [ build_backend_step(edition=edition, ver_mode=ver_mode), build_frontend_step(edition=edition, ver_mode=ver_mode), + build_frontend_package_step(edition=edition, ver_mode=ver_mode), build_plugins_step(edition=edition, sign=True), validate_scuemata_step(), ensure_cuetsified_step(), diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index 7b0ae013de7..71a868959f6 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -1,7 +1,7 @@ load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket') -grabpl_version = 'v2.9.4' -build_image = 'grafana/build-container:1.4.9' +grabpl_version = 'v2.9.7' +build_image = 'grafana/build-container:1.5.3' publish_image = 'grafana/grafana-ci-deploy:1.3.1' deploy_docker_image = 'us.gcr.io/kubernetes-dev/drone/plugins/deploy-image' alpine_image = 'alpine:3.15' @@ -240,6 +240,7 @@ def build_storybook_step(edition, ver_mode): 'depends_on': [ # Best to ensure that this step doesn't mess with what's getting built and packaged 'build-frontend', + 'build-frontend-packages', ], 'environment': { 'NODE_OPTIONS': '--max_old_space_size=4096', @@ -381,13 +382,43 @@ def build_frontend_step(edition, ver_mode, is_downstream=False): 'commands': cmds, } +def build_frontend_package_step(edition, ver_mode, is_downstream=False): + if not is_downstream: + build_no = '${DRONE_BUILD_NUMBER}' + else: + build_no = '$${SOURCE_BUILD_NUMBER}' + + # TODO: Use percentage for num jobs + if ver_mode == 'release': + cmds = [ + './bin/grabpl build-frontend-packages --jobs 8 --github-token $${GITHUB_TOKEN} ' + \ + '--edition {} --no-pull-enterprise ${{DRONE_TAG}}'.format(edition), + ] + else: + cmds = [ + './bin/grabpl build-frontend-packages --jobs 8 --edition {} '.format(edition) + \ + '--build-id {} --no-pull-enterprise'.format(build_no), + ] + + return { + 'name': 'build-frontend-packages', + 'image': build_image, + 'depends_on': [ + 'initialize', + ], + 'environment': { + 'NODE_OPTIONS': '--max_old_space_size=8192', + }, + 'commands': cmds, + } + def build_frontend_docs_step(edition): return { 'name': 'build-frontend-docs', 'image': build_image, 'depends_on': [ - 'build-frontend' + 'build-frontend-packages' ], 'commands': [ './scripts/ci-reference-docs-lint.sh ci', @@ -563,6 +594,7 @@ def package_step(edition, ver_mode, include_enterprise2=False, variants=None, is 'build-plugins', 'build-backend', 'build-frontend', + 'build-frontend-packages', ] if include_enterprise2: sfx = '-enterprise2' @@ -638,6 +670,7 @@ def grafana_server_step(edition, port=3001): 'build-plugins', 'build-backend', 'build-frontend', + 'build-frontend-packages', ], 'environment': environment, 'commands': [