Skip to content

Commit

Permalink
Add check-starlark pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Jul 28, 2021
1 parent b371c68 commit b6c10c3
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def main(ctx):
return initial + before + coverageTests + afterCoverageTests + nonCoverageTests + stages + after

def initialPipelines(ctx):
return dependencies(ctx)
return dependencies(ctx) + checkStarlark()

def beforePipelines(ctx):
return codestyle() + changelog(ctx) + phpstan() + phan()
Expand Down Expand Up @@ -2770,3 +2770,40 @@ def installTestRunner(ctx, phpVersion):
"rsync -aIX /tmp/testrunner/tests %s/tests" % dir["server"],
],
}]

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/**",
],
},
}]

0 comments on commit b6c10c3

Please sign in to comment.