Commit 755f3d0d by Arve Knudsen Committed by GitHub

CI: Migrate to Drone for master builds (#27087)

* CI: Migrate to Drone for master builds
parent b98c85d8
......@@ -16,7 +16,7 @@ steps:
- name: initialize
image: grafana/build-container:1.2.27
commands:
- curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v$${GRABPL_VERSION}/grabpl
- curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.10/grabpl
- chmod +x grabpl
- mkdir -p bin
- mv grabpl bin
......@@ -26,7 +26,6 @@ steps:
- yarn install --frozen-lockfile --no-progress
environment:
DOCKERIZE_VERSION: 0.6.1
GRABPL_VERSION: 0.5.9
- name: lint-backend
image: grafana/build-container:1.2.27
......@@ -84,7 +83,7 @@ steps:
- name: build-backend
image: grafana/build-container:1.2.27
commands:
- ./bin/grabpl build-backend --jobs 8 --edition oss --build-id $DRONE_BUILD_NUMBER --variants linux-x64,linux-x64-musl,osx64,win64 --no-pull-enterprise
- ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --variants linux-x64,linux-x64-musl,osx64,win64 --no-pull-enterprise
depends_on:
- initialize
- lint-backend
......@@ -93,7 +92,7 @@ steps:
- name: build-frontend
image: grafana/build-container:1.2.27
commands:
- ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id $DRONE_BUILD_NUMBER --no-pull-enterprise
- ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise
depends_on:
- initialize
- test-frontend
......@@ -109,7 +108,7 @@ steps:
- name: package
image: grafana/build-container:1.2.27
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
- . 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:
- build-backend
- build-frontend
......@@ -161,7 +160,7 @@ steps:
- package
- name: build-docker-images
image: grafana/drone-grafana-docker:0.2.0
image: grafana/drone-grafana-docker:0.3.1
settings:
archs: amd64
dry_run: true
......@@ -225,7 +224,33 @@ trigger:
---
kind: pipeline
type: docker
name: test-master
name: windows-pr
platform:
os: windows
arch: amd64
version: 1809
steps:
- name: identify-runner
image: mcr.microsoft.com/windows:1809
commands:
- echo $env:DRONE_RUNNER_NAME
- name: initialize
image: grafana/ci-wix:0.1.1
commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.10/windows/grabpl.exe -OutFile grabpl.exe
trigger:
event:
- pull_request
---
kind: pipeline
type: docker
name: build-master
platform:
os: linux
......@@ -240,7 +265,7 @@ steps:
- name: initialize
image: grafana/build-container:1.2.27
commands:
- curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v$${GRABPL_VERSION}/grabpl
- curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.10/grabpl
- chmod +x grabpl
- mkdir -p bin
- mv grabpl bin
......@@ -250,7 +275,18 @@ steps:
- yarn install --frozen-lockfile --no-progress
environment:
DOCKERIZE_VERSION: 0.6.1
GRABPL_VERSION: 0.5.9
- name: trigger-enterprise-downstream
image: grafana/drone-downstream
settings:
params:
- SOURCE_BUILD_NUMBER=${DRONE_BUILD_NUMBER}
- SOURCE_COMMIT=${DRONE_COMMIT}
repositories:
- grafana/grafana-enterprise
server: https://drone.grafana.net
token:
from_secret: drone_token
- name: lint-backend
image: grafana/build-container:1.2.27
......@@ -318,7 +354,7 @@ steps:
- name: build-backend
image: grafana/build-container:1.2.27
commands:
- ./bin/grabpl build-backend --jobs 8 --edition oss --build-id $DRONE_BUILD_NUMBER --no-pull-enterprise
- ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise
depends_on:
- initialize
- lint-backend
......@@ -327,7 +363,7 @@ steps:
- name: build-frontend
image: grafana/build-container:1.2.27
commands:
- ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id $DRONE_BUILD_NUMBER --no-pull-enterprise
- ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise
depends_on:
- initialize
- test-frontend
......@@ -335,7 +371,10 @@ steps:
- name: build-plugins
image: grafana/build-container:1.2.27
commands:
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin
environment:
GRAFANA_API_KEY:
from_secret: grafana_api_key
depends_on:
- initialize
- lint-backend
......@@ -343,7 +382,16 @@ steps:
- name: package
image: grafana/build-container:1.2.27
commands:
- . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --jobs 8 --edition oss --build-id $DRONE_BUILD_NUMBER --no-pull-enterprise
- ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --sign
environment:
GPG_KEY_PASSWORD:
from_secret: gpg_key_password
GPG_PRIV_KEY:
from_secret: gpg_priv_key
GPG_PUB_KEY:
from_secret: gpg_pub_key
GRAFANA_API_KEY:
from_secret: grafana_api_key
depends_on:
- build-backend
- build-frontend
......@@ -383,7 +431,7 @@ steps:
commands:
- printenv GCP_KEY | base64 -d > /tmp/gcpkey.json
- gcloud auth activate-service-account --key-file=/tmp/gcpkey.json
- echo gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://grafana-storybook/canary
- gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://grafana-storybook/canary
environment:
GCP_KEY:
from_secret: gcp_key
......@@ -407,19 +455,25 @@ steps:
- package
- name: build-docker-images
image: grafana/drone-grafana-docker:0.2.0
image: grafana/drone-grafana-docker:0.3.1
settings:
dry_run: true
edition: oss
password:
from_secret: docker_password
username:
from_secret: docker_user
depends_on:
- copy-packages-for-docker
- name: build-docker-images-ubuntu
image: grafana/drone-grafana-docker:0.2.0
image: grafana/drone-grafana-docker:0.3.1
settings:
dry_run: true
edition: oss
password:
from_secret: docker_password
ubuntu: true
username:
from_secret: docker_user
depends_on:
- copy-packages-for-docker
......@@ -461,7 +515,7 @@ steps:
commands:
- npx lerna bootstrap
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
- echo ./scripts/circle-release-next-packages.sh
- ./scripts/circle-release-next-packages.sh
environment:
NPM_TOKEN:
from_secret: npm_token
......@@ -471,7 +525,12 @@ steps:
- name: publish-packages
image: grafana/grafana-ci-deploy:1.2.6
commands:
- echo ./bin/grabpl publish-packages --edition oss
- ./bin/grabpl publish-packages --edition oss
environment:
GCP_GRAFANA_UPLOAD_KEY:
from_secret: gcp_key
GRAFANA_COM_API_KEY:
from_secret: grafana_api_key
depends_on:
- package
- end-to-end-tests
......@@ -503,7 +562,7 @@ trigger:
---
kind: pipeline
type: docker
name: windows-installer-master
name: windows-master
platform:
os: windows
......@@ -514,7 +573,13 @@ steps:
- name: identify-runner
image: mcr.microsoft.com/windows:1809
commands:
- echo $Env:DRONE_RUNNER_NAME
- echo $env:DRONE_RUNNER_NAME
- name: initialize
image: grafana/ci-wix:0.1.1
commands:
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.10/windows/grabpl.exe -OutFile grabpl.exe
- name: build-windows-installer
image: grafana/ci-wix:0.1.1
......@@ -524,17 +589,16 @@ steps:
- dos2unix gcpkey.json
- gcloud auth activate-service-account --key-file=gcpkey.json
- rm gcpkey.json
- $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.9/windows/grabpl.exe -OutFile grabpl.exe
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/oss/master/grafana-7.2.0-9fffe273pre.windows-amd64.zip -OutFile grafana.zip
- cp C:\App\nssm-2.24.zip .
- ./grabpl.exe windows-installer --edition oss grafana.zip
- .\grabpl.exe windows-installer --edition oss --build-id $$env:DRONE_BUILD_NUMBER
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
- echo "gsutil cp $$fname gs://grafana-downloads/oss/master/"
- echo "gsutil cp $$fname.sha256 gs://grafana-downloads/oss/master/"
- gsutil cp $$fname gs://grafana-downloads/oss/master/
- gsutil cp $$fname.sha256 gs://grafana-downloads/oss/master/
environment:
GCP_KEY:
from_secret: gcp_key
depends_on:
- initialize
trigger:
branch:
......@@ -543,6 +607,6 @@ trigger:
- push
depends_on:
- test-master
- build-master
...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment