Files
dockerhub-autobuild/.drone.star
Christian Richter 036a461524 clean up
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-05-12 11:34:45 +02:00

76 lines
2.1 KiB
Plaintext

def main(ctx):
return [
stepPR("amd64", "motsognir"),
stepPR("arm64", "motsognir"),
stepMergeMaster("amd64", "motsognir"),
stepMergeMaster("arm64", "motsognir"),
stepPR("amd64", "webtest"),
stepPR("arm64", "motsognir"),
stepMergeMaster("amd64", "motsognir"),
stepMergeMaster("arm64", "motsognir"),
]
def stepPR(arch, path):
return {
"kind": "pipeline",
"type": "docker",
"name": "docker-build-%s-%s" % (path, arch),
"platform": {
"os": "linux",
"arch": arch,
},
"steps": [
{
"name": "build-image-%s" % (arch),
"image": "plugins/docker",
"settings": {
"dockerfile": "%s/Dockerfile" % (path),
"repo": "dragonchaser/%s" % (path),
"dry_run": "true",
"tag": "latest-%s" % (arch),
}
},
],
"trigger": {
"ref": [
"refs/pull/**",
],
},
}
def stepMergeMaster(arch, path):
return {
"kind": "pipeline",
"type": "docker",
"name": "docker-publish-%s-%s" % (path, arch),
"platform": {
"os": "linux",
"arch": arch,
},
"steps": [
{
"name": "build-build-and-publish-image-%s" % (arch),
"image": "plugins/docker",
"settings": {
"dockerfile": "%s/Dockerfile" % (path),
"repo": "dragonchaser/%s" % (path),
"dry_run": "false",
"tag": "latest-%s" % (arch),
"username": {
"from_secret": "dockerhub-user"
},
"password": {
"from_secret": "dockerhub-password"
}
}
},
],
"trigger": {
"ref": [
"refs/heads/master",
],
},
}