60 lines
1.3 KiB
Plaintext
60 lines
1.3 KiB
Plaintext
def main(ctx):
|
|
return [
|
|
cancelPreviousBuilds(),
|
|
step("amd64"),
|
|
step("arm64"),
|
|
]
|
|
|
|
def cancelPreviousBuilds():
|
|
return [{
|
|
"kind": "pipeline",
|
|
"type": "docker",
|
|
"name": "cancel-previous-builds",
|
|
"clone": {
|
|
"disable": True,
|
|
},
|
|
"steps": [{
|
|
"name": "cancel-previous-builds",
|
|
"image": "owncloudci/drone-cancel-previous-builds",
|
|
"settings": {
|
|
"DRONE_TOKEN": {
|
|
"from_secret": "drone_token",
|
|
},
|
|
},
|
|
}],
|
|
"trigger": {
|
|
"ref": [
|
|
"refs/pull/**",
|
|
],
|
|
},
|
|
}]
|
|
|
|
def step(arch):
|
|
return {
|
|
"kind": "pipeline",
|
|
"type": "docker",
|
|
"name": "docker-%s" % (arch),
|
|
"platform": {
|
|
"os": "linux",
|
|
"arch": arch,
|
|
},
|
|
"steps": [
|
|
{
|
|
"name": "dryrun",
|
|
"image": "plugins/docker",
|
|
"settings": {
|
|
"dockerfile": "motsognir/Dockerfile",
|
|
"dry_run": "true",
|
|
"purge":"true",
|
|
"repo": "dragonchaser/dockerhub-autobuild",
|
|
"tag": "latest"
|
|
}
|
|
},
|
|
],
|
|
"trigger": {
|
|
"ref": [
|
|
"refs/pull/**",
|
|
],
|
|
},
|
|
}
|