Compare commits

..

1 Commits

Author SHA1 Message Date
Christian Richter
42250ac451 Add drone + build motsognir
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-05-11 17:45:46 +02:00

View File

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