Files
grafana/scripts/drone/pipelines/shellcheck.star
Dimitris Sotirakis 2cda971796 Security Scans: Add trivy scans to every docker image used for building/testing/publishing (#69911)
* Created images.star

* Fix typo

* Add cronjobs for build-images
2023-06-12 16:41:18 +03:00

55 lines
1.0 KiB
Plaintext

"""
This module returns a Drone step and pipeline for linting with shellcheck.
"""
load("scripts/drone/steps/lib.star", "compile_build_cmd")
load(
"scripts/drone/utils/utils.star",
"pipeline",
)
load(
"scripts/drone/utils/images.star",
"images",
)
trigger = {
"event": [
"pull_request",
],
"paths": {
"exclude": [
"*.md",
"docs/**",
"latest.json",
],
"include": ["scripts/**/*.sh"],
},
}
def shellcheck_step():
return {
"name": "shellcheck",
"image": images["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,
)