Files
grafana/scripts/drone/pipelines/shellcheck.star
Dimitris Sotirakis 03b1cf763d CI: Backport CI/Release related code to v9.3.x (#62752)
* Batch-move everything

* go mod tidy

* make drone

* Remove genversions

* Bump alpine image

* Revert back pkg/build/docker/build.go

* Make sure correct enterprise branch is checked out

* Add enterprise2 version

* Remove extensions

* Bump build container

* backport node 18 test fix

(cherry picked from commit 4ff03fdbfb)

* Update scripts/drone

* Add more commands

* Fix starlark link

* Copy .drone.star

* Add drone target branch for custom events

---------
2023-02-03 11:43:48 +02:00

51 lines
1019 B
Plaintext

"""
This module returns a Drone step and pipeline for linting with shellcheck.
"""
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():
environment = {"EDITION": "oss"}
steps = [
compile_build_cmd(),
shellcheck_step(),
]
return pipeline(
name = "pr-shellcheck",
edition = "oss",
trigger = trigger,
services = [],
steps = steps,
environment = environment,
)