mirror of
https://github.com/grafana/grafana.git
synced 2026-08-14 15:15:03 -05:00
CI: Make shellcheck a standalone pipeline (#55082)
* Make shellcheck standalone pipeline * Run shellcheck on every .sh change * Change base image * Trigger on script changes * Run shellcheck on PRs only
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
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,
|
||||
)
|
||||
|
||||
@@ -4,7 +4,6 @@ load(
|
||||
'download_grabpl_step',
|
||||
'wire_install_step',
|
||||
'codespell_step',
|
||||
'shellcheck_step',
|
||||
'lint_backend_step',
|
||||
'lint_drone_step',
|
||||
'test_backend_step',
|
||||
@@ -28,7 +27,6 @@ def test_backend(trigger, ver_mode):
|
||||
]
|
||||
test_steps = [
|
||||
codespell_step(),
|
||||
shellcheck_step(),
|
||||
lint_backend_step(edition="oss"),
|
||||
test_backend_step(edition="oss"),
|
||||
test_backend_integration_step(edition="oss"),
|
||||
|
||||
Reference in New Issue
Block a user