2020-01-08 19:13:53 +00:00
|
|
|
def main(ctx):
|
|
|
|
return [
|
2021-01-20 17:43:59 +00:00
|
|
|
step("3.12"),
|
2021-06-18 08:25:52 +00:00
|
|
|
step("3.13"),
|
2021-11-24 22:40:53 +00:00
|
|
|
step("3.14"),
|
|
|
|
step("3.15",["latest"]),
|
2020-01-08 19:13:53 +00:00
|
|
|
step("edge"),
|
|
|
|
]
|
|
|
|
|
|
|
|
def step(alpinever,tags=[]):
|
2021-01-20 17:43:59 +00:00
|
|
|
vertest = "grep -q '%s' /etc/alpine-release && " % alpinever if alpinever != "edge" else ""
|
2020-01-08 19:13:53 +00:00
|
|
|
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": {
|
2021-01-20 17:43:59 +00:00
|
|
|
"run": vertest + "su-exec nobody apk --version",
|
2020-01-08 19:13:53 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "publish",
|
|
|
|
"image": "spritsail/docker-publish",
|
|
|
|
"pull": "always",
|
|
|
|
"settings": {
|
|
|
|
"repo": "spritsail/alpine",
|
|
|
|
"tags": [alpinever] + tags,
|
2020-06-13 15:36:20 +00:00
|
|
|
"username": {"from_secret": "docker_username"},
|
|
|
|
"password": {"from_secret": "docker_password"},
|
2020-01-08 19:13:53 +00:00
|
|
|
},
|
|
|
|
"when": {
|
|
|
|
"branch": ["master"],
|
|
|
|
"event": ["push"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|