Tobias Trabelsi
cce376cc4b
All checks were successful
continuous-integration/drone/push Build is passing
55 lines
1.1 KiB
Plaintext
55 lines
1.1 KiB
Plaintext
|
|
def main(ctx):
|
|
return [
|
|
pipeline("debian", ["ubuntu-22.04", "ubuntu-20.04"]),
|
|
pipeline("rhel", ["fedora-34", "fedora-35"]),
|
|
]
|
|
|
|
def generateStep(tag):
|
|
return {
|
|
"name": "build-" + tag,
|
|
"image": "plugins/kaniko",
|
|
"settings": {
|
|
"dockerfile": tag + "/Dockerfile",
|
|
"password": {
|
|
"from_secret": "docker_password"
|
|
},
|
|
"username": {
|
|
"from_secret": "docker_username"
|
|
},
|
|
"repo": "lerentis/ansible",
|
|
"tags": [
|
|
tag
|
|
]
|
|
},
|
|
"when": {
|
|
"event": [
|
|
"push",
|
|
"pull_request",
|
|
"cron"
|
|
]
|
|
},
|
|
"ressources": {
|
|
"limits": {
|
|
"cpu": "200",
|
|
"memory": "1024MiB"
|
|
}
|
|
}
|
|
}
|
|
|
|
def pipeline(group, tags):
|
|
steps = []
|
|
for tag in tags:
|
|
steps += generateStep(tag)
|
|
print(generateStep(tag))
|
|
print(steps)
|
|
return {
|
|
"kind": "pipeline",
|
|
"type": "kubernetes",
|
|
"name": "build-%s" % group,
|
|
"platform": {
|
|
"os": "linux",
|
|
"arch": "amd64"
|
|
},
|
|
"steps": steps
|
|
} |