mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 15:12:46 +08:00

* Make shellcheck standalone pipeline * Run shellcheck on every .sh change * Change base image * Trigger on script changes * Run shellcheck on PRs only
49 lines
863 B
Plaintext
49 lines
863 B
Plaintext
load(
|
|
'scripts/drone/steps/lib.star',
|
|
'build_image',
|
|
'compile_build_cmd'
|
|
)
|
|
|
|
load(
|
|
'scripts/drone/utils/utils.star',
|
|
'pipeline',
|
|
)
|
|
|
|
trigger = {
|
|
'event': [
|
|
'pull_request',
|
|
],
|
|
'paths': {
|
|
'exclude': [
|
|
'*.md',
|
|
'docs/**',
|
|
'latest.json',
|
|
],
|
|
'include': [
|
|
'scripts/**/*.sh'
|
|
],
|
|
},
|
|
}
|
|
|
|
def shellcheck_step():
|
|
return {
|
|
'name': 'shellcheck',
|
|
'image': build_image,
|
|
'depends_on': [
|
|
'compile-build-cmd',
|
|
],
|
|
'commands': [
|
|
'./bin/build shellcheck',
|
|
],
|
|
}
|
|
|
|
def shellcheck_pipeline():
|
|
steps = [
|
|
compile_build_cmd(),
|
|
shellcheck_step(),
|
|
]
|
|
return pipeline(
|
|
name='pr-shellcheck', edition="oss", trigger=trigger, services=[], steps=steps,
|
|
)
|
|
|