mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CI: Add pr-verify-drone
pipeline (#51951)
* Introduce pr-verify-drone pipeline * Remove `make drone` pre-commit hook * Remove lint-drone from test-backend pipeline
This commit is contained in:
parent
62b0a8bae6
commit
2af5feb147
51
.drone.yml
51
.drone.yml
@ -1,6 +1,49 @@
|
||||
---
|
||||
depends_on: []
|
||||
kind: pipeline
|
||||
name: pr-verify-drone
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.15
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.52/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
- commands:
|
||||
- ./bin/grabpl verify-drone
|
||||
depends_on:
|
||||
- grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: lint-drone
|
||||
trigger:
|
||||
event:
|
||||
- pull_request
|
||||
paths:
|
||||
exclude:
|
||||
- docs/**
|
||||
- '*.md'
|
||||
include:
|
||||
- scripts/drone/**
|
||||
- .drone.yml
|
||||
- .drone.star
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
depends_on: []
|
||||
kind: pipeline
|
||||
name: pr-test-frontend
|
||||
node:
|
||||
type: no-parallel
|
||||
@ -116,12 +159,6 @@ steps:
|
||||
- verify-gen-cue
|
||||
image: grafana/build-container:1.5.7
|
||||
name: wire-install
|
||||
- commands:
|
||||
- ./bin/grabpl verify-drone
|
||||
depends_on:
|
||||
- grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: lint-drone
|
||||
- commands:
|
||||
- |-
|
||||
echo -e "unknwon
|
||||
@ -4843,6 +4880,6 @@ kind: secret
|
||||
name: gcp_upload_artifacts_key
|
||||
---
|
||||
kind: signature
|
||||
hmac: 74b8d8bd1c224fb4b1eb263d989588095bd9001519bebbe9a4fc5a9aa924aa41
|
||||
hmac: 55383abbbc205824d35aa689a0e00f374e74520d77dc387e354b063e4ade0869
|
||||
|
||||
...
|
||||
|
@ -72,9 +72,6 @@
|
||||
],
|
||||
"*pkg/**/*.go": [
|
||||
"gofmt -w -s"
|
||||
],
|
||||
"*.star": [
|
||||
"make drone"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -70,6 +70,16 @@ trigger = {
|
||||
},
|
||||
}
|
||||
|
||||
def pr_verify_drone():
|
||||
steps = [
|
||||
identify_runner_step(),
|
||||
download_grabpl_step(),
|
||||
lint_drone_step(),
|
||||
]
|
||||
return pipeline(
|
||||
name='pr-verify-drone', edition="oss", trigger=get_pr_trigger(include_paths=['scripts/drone/**', '.drone.yml', '.drone.star']), services=[], steps=steps,
|
||||
)
|
||||
|
||||
|
||||
def pr_test_frontend():
|
||||
init_steps = [
|
||||
@ -97,7 +107,6 @@ def pr_test_backend():
|
||||
wire_install_step(),
|
||||
]
|
||||
test_steps = [
|
||||
lint_drone_step(),
|
||||
codespell_step(),
|
||||
shellcheck_step(),
|
||||
lint_backend_step(edition="oss"),
|
||||
@ -149,6 +158,7 @@ def pr_pipelines(edition):
|
||||
])
|
||||
|
||||
return [
|
||||
pr_verify_drone(),
|
||||
pr_test_frontend(),
|
||||
pr_test_backend(),
|
||||
pipeline(
|
||||
|
Loading…
Reference in New Issue
Block a user