Compare commits
1 Commits
42250ac451
...
236e5f831d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
236e5f831d |
110
.drone.star
110
.drone.star
@@ -1,82 +1,38 @@
|
|||||||
def main(ctx):
|
def main(ctx):
|
||||||
return [
|
return [
|
||||||
stepPR("amd64"),
|
step("amd64"),
|
||||||
stepPR("arm64"),
|
step("arm64"),
|
||||||
stepMergeMaster("amd64"),
|
]
|
||||||
stepMergeMaster("arm64"),
|
|
||||||
]
|
|
||||||
|
|
||||||
|
def step(arch):
|
||||||
def stepPR(arch):
|
return {
|
||||||
return {
|
"kind": "pipeline",
|
||||||
"kind":
|
"type": "docker",
|
||||||
"pipeline",
|
"name": "docker-%s" % (arch),
|
||||||
"type":
|
"platform": {
|
||||||
"docker",
|
|
||||||
"name":
|
|
||||||
"docker-%s" % (arch),
|
|
||||||
"platform": {
|
|
||||||
"os": "linux",
|
"os": "linux",
|
||||||
"arch": arch,
|
"arch": arch,
|
||||||
},
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"name": "build-and-push-image-%s" % (arch),
|
"name": "build-image-%s" % (arch),
|
||||||
"image": "plugins/docker",
|
"image": "plugins/docker",
|
||||||
"settings": {
|
"settings": {
|
||||||
"dockerfile": "motsognir/Dockerfile",
|
"dockerfile": "motsognir/Dockerfile",
|
||||||
"repo": "dragonchaser/motsognir",
|
"repo": "dragonchaser/motsognir",
|
||||||
"dry_run": "true",
|
"tag": "latest-%s" % (arch),
|
||||||
"tag": "latest-%s" % (arch),
|
"username": {
|
||||||
"username": {
|
"from_secret":"dockerhub-user"
|
||||||
"from_secret": "dockerhub-user"
|
},
|
||||||
},
|
"password": {
|
||||||
"password": {
|
"from_secret":"dockerhub-password"
|
||||||
"from_secret": "dockerhub-password"
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
],
|
||||||
],
|
"trigger": {
|
||||||
"trigger": {
|
"ref": [
|
||||||
"ref": [
|
"refs/pull/**",
|
||||||
"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",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user