Commit 396ff9f4 by Arve Knudsen Committed by GitHub

Drone: Disable enterprise build for PRs (#26241)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent 6d8545da
......@@ -52,7 +52,7 @@ def pipeline_set(kind, name):
# There should be a 'fail' function in Starlark, but won't build
return []
return [
pipelines = [
{
'kind': 'pipeline',
'type': 'docker',
......@@ -370,7 +370,12 @@ def pipeline_set(kind, name):
},
],
},
{
]
if kind != pr_kind:
# For now at least, we have to disable the enterprise pipeline for PRs, since PRs don't have access
# to secrets with Drone (in Circle, you can share secrets with PRs internal to the repo).
pipelines.append({
'kind': 'pipeline',
'type': 'docker',
'name': '{}-enterprise'.format(name),
......@@ -484,5 +489,6 @@ def pipeline_set(kind, name):
# },
# },
]
},
]
})
return pipelines
......@@ -233,119 +233,4 @@ trigger:
event:
- pull_request
---
kind: pipeline
type: docker
name: test-pr-enterprise
platform:
os: linux
arch: amd64
steps:
- name: install-deps
image: grafana/build-container:1.2.21
commands:
- curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v$${GRABPL_VERSION}/grabpl
- chmod +x grabpl
- mkdir -p bin
- mv grabpl bin
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
- tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
- rm dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
- yarn install --frozen-lockfile --no-progress
- cp -r $(yarn cache dir) yarn-cache
environment:
DOCKERIZE_VERSION: 0.6.1
GRABPL_VERSION: 0.4.15
when:
repo:
- grafana/grafana
- aknuds1/grafana
- name: build-backend
image: grafana/build-container:1.2.21
commands:
- ./bin/grabpl build-backend --github-token "$${GITHUB_TOKEN}" --edition enterprise --build-id $DRONE_BUILD_NUMBER --variants linux-x64,linux-x64-musl,osx64,win64
environment:
GITHUB_TOKEN:
from_secret: github_token
when:
repo:
- grafana/grafana
- aknuds1/grafana
depends_on:
- install-deps
- name: build-frontend
image: grafana/build-container:1.2.21
commands:
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
- ./bin/grabpl build-frontend --no-install-deps --github-token "$${GITHUB_TOKEN}" --edition enterprise --build-id $DRONE_BUILD_NUMBER
environment:
GITHUB_TOKEN:
from_secret: github_token
when:
repo:
- grafana/grafana
- aknuds1/grafana
depends_on:
- install-deps
- name: build-plugins
image: grafana/build-container:1.2.21
commands:
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
- ./bin/grabpl build-plugins --edition enterprise --no-install-deps
when:
repo:
- grafana/grafana
- aknuds1/grafana
depends_on:
- install-deps
- name: package
image: grafana/build-container:1.2.21
commands:
- . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --github-token "$${GITHUB_TOKEN}" --edition enterprise --build-id $DRONE_BUILD_NUMBER --variants linux-x64,linux-x64-musl,osx64,win64
environment:
GITHUB_TOKEN:
from_secret: github_token
when:
repo:
- grafana/grafana
- aknuds1/grafana
depends_on:
- build-backend
- build-frontend
- build-plugins
- name: copy-packages-for-docker
image: grafana/build-container:1.2.21
commands:
- cp dist/*.tar.gz packaging/docker/
when:
repo:
- grafana/grafana
- aknuds1/grafana
depends_on:
- package
- name: build-docker-images
image: grafana/drone-grafana-docker:0.2.0
settings:
archs: amd64
dry_run: true
edition: enterprise
when:
repo:
- grafana/grafana
- aknuds1/grafana
depends_on:
- copy-packages-for-docker
trigger:
event:
- pull_request
...
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