CI: Allow other modules to register build sub-commands (#62741)

* Allow other modules to register build sub-commands

* CI: Fix retries on artifacts-page clone

* Fix linting errors

* Fix golint issues

* Update to grabpl 3.0.21
This commit is contained in:
Horst Gutmann 2023-02-02 12:35:43 +01:00 committed by GitHub
parent 29d3e696f0
commit 312ea59e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 102 additions and 59 deletions

View File

@ -21,7 +21,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -77,7 +77,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -132,7 +132,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -481,7 +481,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -834,7 +834,7 @@ steps:
name: clone-enterprise name: clone-enterprise
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -951,7 +951,7 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -1068,7 +1068,7 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -1145,7 +1145,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -1395,7 +1395,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -1826,7 +1826,7 @@ services:
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -1942,7 +1942,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/windows/grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
-OutFile grabpl.exe -OutFile grabpl.exe
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
name: windows-init name: windows-init
@ -2121,7 +2121,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -2427,7 +2427,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -2574,7 +2574,7 @@ services:
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -2680,7 +2680,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/windows/grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
-OutFile grabpl.exe -OutFile grabpl.exe
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
name: windows-init name: windows-init
@ -2737,7 +2737,7 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -3063,7 +3063,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -3128,7 +3128,7 @@ steps:
name: clone-enterprise name: clone-enterprise
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -3253,7 +3253,7 @@ services:
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -3406,7 +3406,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/windows/grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
-OutFile 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
@ -3483,7 +3483,7 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -3733,7 +3733,7 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -3984,7 +3984,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -4080,7 +4080,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -4159,7 +4159,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -4598,7 +4598,7 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -4695,7 +4695,7 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -4775,7 +4775,7 @@ clone:
retries: 3 retries: 3
depends_on: [] depends_on: []
environment: environment:
EDITION: all EDITION: enterprise
image_pull_secrets: image_pull_secrets:
- dockerconfigjson - dockerconfigjson
kind: pipeline kind: pipeline
@ -4789,14 +4789,47 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
- commands: - commands:
- ./bin/grabpl artifacts-page - 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:v1.7.1
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: depends_on:
- grabpl - clone-enterprise
environment:
GITHUB_TOKEN:
from_secret: github_token
image: grafana/build-container:v1.7.1
name: init-enterprise
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on:
- init-enterprise
environment:
CGO_ENABLED: 0
image: golang:1.19.4
name: compile-build-cmd
- commands:
- ./bin/build artifacts-page
depends_on:
- compile-build-cmd
environment: environment:
GCP_KEY: GCP_KEY:
from_secret: gcp_key from_secret: gcp_key
@ -4834,7 +4867,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -5113,7 +5146,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -5254,7 +5287,7 @@ services:
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -5357,7 +5390,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/windows/grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
-OutFile grabpl.exe -OutFile grabpl.exe
image: grafana/ci-wix:0.1.1 image: grafana/ci-wix:0.1.1
name: windows-init name: windows-init
@ -5407,7 +5440,7 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -5735,7 +5768,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -5797,7 +5830,7 @@ steps:
name: clone-enterprise name: clone-enterprise
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -5918,7 +5951,7 @@ services:
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -6067,7 +6100,7 @@ steps:
name: identify-runner name: identify-runner
- commands: - commands:
- $$ProgressPreference = "SilentlyContinue" - $$ProgressPreference = "SilentlyContinue"
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/windows/grabpl.exe - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
-OutFile 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
@ -6137,7 +6170,7 @@ services: []
steps: steps:
- commands: - commands:
- mkdir -p bin - mkdir -p bin
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
- chmod +x bin/grabpl - chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8 image: byrnedo/alpine-curl:0.1.8
name: grabpl name: grabpl
@ -6623,6 +6656,6 @@ kind: secret
name: aws_secret_access_key name: aws_secret_access_key
--- ---
kind: signature kind: signature
hmac: 95e4fb0e6f8711827520c8570468570ba5a3ba17894556489937f4543635c036 hmac: 3e72bf092e103764489c02760188a3529c06c2e91ea34fa234794491f274a5a0
... ...

View File

@ -52,4 +52,8 @@ var (
EnvVars: []string{"GITHUB_TOKEN"}, EnvVars: []string{"GITHUB_TOKEN"},
Usage: "GitHub token", Usage: "GitHub token",
} }
tagFlag = cli.StringFlag{
Name: "tag",
Usage: "Grafana version tag",
}
) )

View File

@ -10,6 +10,13 @@ import (
"github.com/grafana/grafana/pkg/build/docker" "github.com/grafana/grafana/pkg/build/docker"
) )
var additionalCommands []*cli.Command = make([]*cli.Command, 0, 5)
//nolint:unused
func registerAppCommand(c *cli.Command) {
additionalCommands = append(additionalCommands, c)
}
func main() { func main() {
app := cli.NewApp() app := cli.NewApp()
app.Commands = cli.Commands{ app.Commands = cli.Commands{
@ -280,10 +287,7 @@ func main() {
ArgsUsage: "[version]", ArgsUsage: "[version]",
Action: NpmReleaseAction, Action: NpmReleaseAction,
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &tagFlag,
Name: "tag",
Usage: "Grafana version tag",
},
}, },
}, },
{ {
@ -291,10 +295,7 @@ func main() {
Usage: "Store npm packages tarball", Usage: "Store npm packages tarball",
Action: NpmStoreAction, Action: NpmStoreAction,
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &tagFlag,
Name: "tag",
Usage: "Grafana version tag",
},
}, },
}, },
{ {
@ -302,10 +303,7 @@ func main() {
Usage: "Retrieve npm packages tarball", Usage: "Retrieve npm packages tarball",
Action: NpmRetrieveAction, Action: NpmRetrieveAction,
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{ &tagFlag,
Name: "tag",
Usage: "Grafana version tag",
},
}, },
}, },
}, },
@ -417,6 +415,8 @@ func main() {
}, },
} }
app.Commands = append(app.Commands, additionalCommands...)
if err := app.Run(os.Args); err != nil { if err := app.Run(os.Args); err != nil {
log.Fatalln(err) log.Fatalln(err)
} }

View File

@ -647,8 +647,14 @@ def artifacts_page_pipeline():
pipeline( pipeline(
name = "publish-artifacts-page", name = "publish-artifacts-page",
trigger = trigger, trigger = trigger,
steps = [download_grabpl_step(), artifacts_page_step()], steps = [
download_grabpl_step(),
clone_enterprise_step(source = "${DRONE_TAG}"),
init_enterprise_step("release"),
compile_build_cmd("enterprise"),
artifacts_page_step(),
],
edition = "all", edition = "all",
environment = {"EDITION": "all"}, environment = {"EDITION": "enterprise"},
), ),
] ]

View File

@ -8,7 +8,7 @@ load(
"prerelease_bucket", "prerelease_bucket",
) )
grabpl_version = "v3.0.20" grabpl_version = "v3.0.21"
build_image = "grafana/build-container:v1.7.1" build_image = "grafana/build-container:v1.7.1"
publish_image = "grafana/grafana-ci-deploy:1.3.3" publish_image = "grafana/grafana-ci-deploy:1.3.3"
deploy_docker_image = "us.gcr.io/kubernetes-dev/drone/plugins/deploy-image" deploy_docker_image = "us.gcr.io/kubernetes-dev/drone/plugins/deploy-image"
@ -1520,13 +1520,13 @@ def artifacts_page_step():
"name": "artifacts-page", "name": "artifacts-page",
"image": build_image, "image": build_image,
"depends_on": [ "depends_on": [
"grabpl", "compile-build-cmd",
], ],
"environment": { "environment": {
"GCP_KEY": from_secret("gcp_key"), "GCP_KEY": from_secret("gcp_key"),
}, },
"commands": [ "commands": [
"./bin/grabpl artifacts-page", "./bin/build artifacts-page",
], ],
} }