mirror of
https://github.com/spritsail/alpine.git
synced 2024-11-05 09:26:23 +00:00
52 lines
1.2 KiB
Plaintext
52 lines
1.2 KiB
Plaintext
def main(ctx):
|
|
return [
|
|
step("3.11"),
|
|
step("3.12"),
|
|
step("3.13"),
|
|
step("3.14",["latest"]),
|
|
step("edge"),
|
|
]
|
|
|
|
def step(alpinever,tags=[]):
|
|
vertest = "grep -q '%s' /etc/alpine-release && " % alpinever if alpinever != "edge" else ""
|
|
return {
|
|
"kind": "pipeline",
|
|
"name": "build-%s" % alpinever,
|
|
"steps": [
|
|
{
|
|
"name": "build",
|
|
"image": "spritsail/docker-build",
|
|
"pull": "always",
|
|
"settings": {
|
|
"build_args": [
|
|
"ALPINE_TAG=%s" % alpinever,
|
|
],
|
|
},
|
|
},
|
|
{
|
|
"name": "test",
|
|
"image": "spritsail/docker-test",
|
|
"pull": "always",
|
|
"settings": {
|
|
"run": vertest + "su-exec nobody apk --version",
|
|
},
|
|
},
|
|
{
|
|
"name": "publish",
|
|
"image": "spritsail/docker-publish",
|
|
"pull": "always",
|
|
"settings": {
|
|
"repo": "spritsail/alpine",
|
|
"tags": [alpinever] + tags,
|
|
"username": {"from_secret": "docker_username"},
|
|
"password": {"from_secret": "docker_password"},
|
|
},
|
|
"when": {
|
|
"branch": ["master"],
|
|
"event": ["push"],
|
|
},
|
|
},
|
|
]
|
|
}
|
|
|