Skip to content

Commit

Permalink
Add clone-enterprise and init-enterprise steps (grafana#56662)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsotirakis authored Oct 10, 2022
1 parent 3f89de1 commit eb077db
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 50 deletions.
144 changes: 99 additions & 45 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ steps:
- grabpl
image: grafana/build-container:1.6.3
name: yarn-install
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.19.2
name: compile-build-cmd
- commands:
- yarn betterer ci
depends_on:
Expand Down Expand Up @@ -931,13 +924,6 @@ steps:
- grabpl
image: grafana/build-container:1.6.3
name: yarn-install
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.19.2
name: compile-build-cmd
- commands:
- yarn betterer ci
depends_on:
Expand Down Expand Up @@ -2263,13 +2249,6 @@ steps:
- grabpl
image: grafana/build-container:1.6.3
name: yarn-install
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.19.2
name: compile-build-cmd
- commands:
- yarn betterer ci
depends_on:
Expand Down Expand Up @@ -2930,13 +2909,6 @@ steps:
- grabpl
image: grafana/build-container:1.6.3
name: yarn-install
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.19.2
name: compile-build-cmd
- commands:
- yarn betterer ci
depends_on:
Expand Down Expand Up @@ -2983,13 +2955,39 @@ platform:
os: linux
services: []
steps:
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
- git checkout ${DRONE_TAG}
environment:
GITHUB_TOKEN:
from_secret: github_token
image: grafana/build-container:1.6.3
name: clone-enterprise
- commands:
- mv bin/grabpl /tmp/
- rmdir bin
- mv grafana-enterprise /tmp/
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
${DRONE_TAG}
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
- mkdir bin
- mv /tmp/grabpl bin/
depends_on:
- clone-enterprise
environment:
GITHUB_TOKEN:
from_secret: github_token
image: grafana/build-container:1.6.3
name: init-enterprise
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15.6
name: identify-runner
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on: []
depends_on:
- init-enterprise
environment:
CGO_ENABLED: 0
image: golang:1.19.2
Expand Down Expand Up @@ -3052,6 +3050,31 @@ platform:
os: linux
services: []
steps:
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
- git checkout ${DRONE_TAG}
environment:
GITHUB_TOKEN:
from_secret: github_token
image: grafana/build-container:1.6.3
name: clone-enterprise
- commands:
- mv bin/grabpl /tmp/
- rmdir bin
- mv grafana-enterprise /tmp/
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
${DRONE_TAG}
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
- mkdir bin
- mv /tmp/grabpl bin/
depends_on:
- clone-enterprise
environment:
GITHUB_TOKEN:
from_secret: github_token
image: grafana/build-container:1.6.3
name: init-enterprise
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15.6
Expand Down Expand Up @@ -4257,13 +4280,6 @@ steps:
- grabpl
image: grafana/build-container:1.6.3
name: yarn-install
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.19.2
name: compile-build-cmd
- commands:
- yarn betterer ci
depends_on:
Expand Down Expand Up @@ -4885,13 +4901,6 @@ steps:
- grabpl
image: grafana/build-container:1.6.3
name: yarn-install
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on: []
environment:
CGO_ENABLED: 0
image: golang:1.19.2
name: compile-build-cmd
- commands:
- yarn betterer ci
depends_on:
Expand Down Expand Up @@ -4932,13 +4941,36 @@ platform:
os: linux
services: []
steps:
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
- git checkout ${DRONE_BRANCH}
environment:
GITHUB_TOKEN:
from_secret: github_token
image: grafana/build-container:1.6.3
name: clone-enterprise
- commands:
- mv bin/grabpl /tmp/
- rmdir bin
- mv grafana-enterprise /tmp/
- /tmp/grabpl init-enterprise /tmp/grafana-enterprise
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
- mkdir bin
- mv /tmp/grabpl bin/
depends_on:
- clone-enterprise
environment: {}
image: grafana/build-container:1.6.3
name: init-enterprise
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15.6
name: identify-runner
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on: []
depends_on:
- init-enterprise
environment:
CGO_ENABLED: 0
image: golang:1.19.2
Expand Down Expand Up @@ -4995,6 +5027,28 @@ platform:
os: linux
services: []
steps:
- commands:
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
- cd grafana-enterprise
- git checkout ${DRONE_BRANCH}
environment:
GITHUB_TOKEN:
from_secret: github_token
image: grafana/build-container:1.6.3
name: clone-enterprise
- commands:
- mv bin/grabpl /tmp/
- rmdir bin
- mv grafana-enterprise /tmp/
- /tmp/grabpl init-enterprise /tmp/grafana-enterprise
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
- mkdir bin
- mv /tmp/grabpl bin/
depends_on:
- clone-enterprise
environment: {}
image: grafana/build-container:1.6.3
name: init-enterprise
- commands:
- echo $DRONE_RUNNER_NAME
image: alpine:3.15.6
Expand Down Expand Up @@ -5494,6 +5548,6 @@ kind: secret
name: packages_secret_access_key
---
kind: signature
hmac: 0a4cc4cfd81481dbb25b9ccfc22ddd4ad23bbaa1b775e5c64aba2533ccfe1676
hmac: 82dedf98f127a4d16c71b668d9a2df17502c109cc6ff0ab01e770547250135e7

...
11 changes: 8 additions & 3 deletions scripts/drone/pipelines/test_backend.star
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ load(
'test_backend_integration_step',
'verify_gen_cue_step',
'compile_build_cmd',
'clone_enterprise_step',
'init_enterprise_step',
)

load(
Expand All @@ -15,12 +17,15 @@ load(

def test_backend(trigger, ver_mode, edition="oss"):
environment = {'EDITION': edition}
init_steps = [
init_steps = []
if edition != 'oss':
init_steps.extend([clone_enterprise_step(ver_mode), init_enterprise_step(ver_mode),])
init_steps.extend([
identify_runner_step(),
compile_build_cmd(),
compile_build_cmd(edition),
verify_gen_cue_step(edition="oss"),
wire_install_step(),
]
])
test_steps = [
test_backend_step(edition),
test_backend_integration_step(edition),
Expand Down
2 changes: 0 additions & 2 deletions scripts/drone/pipelines/test_frontend.star
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ load(
'yarn_install_step',
'betterer_frontend_step',
'test_frontend_step',
'compile_build_cmd',
)

load(
Expand All @@ -19,7 +18,6 @@ def test_frontend(trigger, ver_mode, edition="oss"):
identify_runner_step(),
download_grabpl_step(),
yarn_install_step(),
compile_build_cmd(),
]
test_steps = [
betterer_frontend_step(),
Expand Down

0 comments on commit eb077db

Please sign in to comment.