Skip to content

Commit

Permalink
add check starlark step
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Apr 20, 2021
1 parent 8da1222 commit 72c3bbc
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def main(ctx):
after = afterPipelines(ctx)
dependsOn(stages, after)

return before + stages + after
return before + stages + after + checkStarlark()

def beforePipelines(ctx):
return yarnlint() + changelog(ctx) + website(ctx)
Expand Down Expand Up @@ -2001,6 +2001,28 @@ def githubComment():
},
}]

def checkStarlark():
return [{
"kind": "pipeline",
"type": "docker",
"name": "check-starlark",
"steps": [{
"name": "lint-starlark",
"image": "owncloudci/golang:1.16",
"pull": "always",
"commands": [
"go install github.com/bazelbuild/buildtools/buildifier@latest",
"buildifier /drone/src/.drone.star",
],
}],
"depends_on": [],
"trigger": {
"ref": [
"refs/pull/**",
],
},
}]

def dependsOn(earlierStages, nextStages):
for earlierStage in earlierStages:
for nextStage in nextStages:
Expand Down

0 comments on commit 72c3bbc

Please sign in to comment.