diff --git a/.drone.star b/.drone.star index 49effd6785..f167e5eba3 100644 --- a/.drone.star +++ b/.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'