mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-25 14:08:53 -06:00
add starlark format linting step
This commit is contained in:
38
.drone.star
38
.drone.star
@@ -231,6 +231,7 @@ def main(ctx):
|
||||
)
|
||||
)
|
||||
|
||||
pipelines.append(checkStarlark)
|
||||
pipelineSanityChecks(ctx, pipelines)
|
||||
return pipelines
|
||||
|
||||
@@ -1578,6 +1579,43 @@ def deploy(ctx, config, rebuild):
|
||||
},
|
||||
}
|
||||
|
||||
def checkStarlark():
|
||||
return [{
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "check-starlark",
|
||||
"steps": [
|
||||
{
|
||||
"name": "format-check-starlark",
|
||||
"image": "owncloudci/bazel-buildifier",
|
||||
"pull": "always",
|
||||
"commands": [
|
||||
"buildifier --mode=check .drone.star",
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "show-diff",
|
||||
"image": "owncloudci/bazel-buildifier",
|
||||
"pull": "always",
|
||||
"commands": [
|
||||
"buildifier --mode=fix .drone.star",
|
||||
"git diff",
|
||||
],
|
||||
"when": {
|
||||
"status": [
|
||||
"failure",
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
"depends_on": [],
|
||||
"trigger": {
|
||||
"ref": [
|
||||
"refs/pull/**",
|
||||
],
|
||||
},
|
||||
}]
|
||||
|
||||
def genericCache(name, action, mounts, cache_key):
|
||||
rebuild = 'false'
|
||||
restore = 'false'
|
||||
|
||||
Reference in New Issue
Block a user