mirror of
https://github.com/spritsail/alpine.git
synced 2025-06-14 15:11:12 +00:00
Compare commits
4 Commits
implicit-c
...
starlark
Author | SHA1 | Date | |
---|---|---|---|
6d1a483ead
|
|||
67d0500768
|
|||
2a2b9c265d
|
|||
754ef911d5
|
52
.drone.star
52
.drone.star
@ -1,14 +1,14 @@
|
|||||||
def main(ctx):
|
def main(ctx):
|
||||||
return [
|
versions = [
|
||||||
step("3.10"),
|
["3.9",[]],
|
||||||
step("3.11"),
|
["3.10",[]],
|
||||||
step("3.12"),
|
["3.11", ["latest"]],
|
||||||
step("3.13",["latest"]),
|
["edge", []],
|
||||||
step("edge"),
|
["chrislane", ["😍"]],
|
||||||
]
|
]
|
||||||
|
return [step(v[0], v[1]) for v in versions] + [notify(["build-%s" % v for v, _ in versions])]
|
||||||
|
|
||||||
def step(alpinever,tags=[]):
|
def step(alpinever,tags=[]):
|
||||||
vertest = "grep -q '%s' /etc/alpine-release && " % alpinever if alpinever != "edge" else ""
|
|
||||||
return {
|
return {
|
||||||
"kind": "pipeline",
|
"kind": "pipeline",
|
||||||
"name": "build-%s" % alpinever,
|
"name": "build-%s" % alpinever,
|
||||||
@ -18,6 +18,7 @@ def step(alpinever,tags=[]):
|
|||||||
"image": "spritsail/docker-build",
|
"image": "spritsail/docker-build",
|
||||||
"pull": "always",
|
"pull": "always",
|
||||||
"settings": {
|
"settings": {
|
||||||
|
"repo": "alpine-dev-%s" % alpinever,
|
||||||
"build_args": [
|
"build_args": [
|
||||||
"ALPINE_TAG=%s" % alpinever,
|
"ALPINE_TAG=%s" % alpinever,
|
||||||
],
|
],
|
||||||
@ -28,7 +29,8 @@ def step(alpinever,tags=[]):
|
|||||||
"image": "spritsail/docker-test",
|
"image": "spritsail/docker-test",
|
||||||
"pull": "always",
|
"pull": "always",
|
||||||
"settings": {
|
"settings": {
|
||||||
"run": vertest + "su-exec nobody apk --version",
|
"repo": "spritsail/alpine",
|
||||||
|
"run": "su-exec nobody apk --version",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -36,10 +38,17 @@ def step(alpinever,tags=[]):
|
|||||||
"image": "spritsail/docker-publish",
|
"image": "spritsail/docker-publish",
|
||||||
"pull": "always",
|
"pull": "always",
|
||||||
"settings": {
|
"settings": {
|
||||||
|
"from": "alpine-dev-%s" % alpinever,
|
||||||
"repo": "spritsail/alpine",
|
"repo": "spritsail/alpine",
|
||||||
"tags": [alpinever] + tags,
|
"tags": [alpinever] + tags,
|
||||||
"username": {"from_secret": "docker_username"},
|
},
|
||||||
"password": {"from_secret": "docker_password"},
|
"environment": {
|
||||||
|
"DOCKER_USERNAME": {
|
||||||
|
"from_secret": "docker_username",
|
||||||
|
},
|
||||||
|
"DOCKER_PASSWORD": {
|
||||||
|
"from_secret": "docker_password",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"when": {
|
"when": {
|
||||||
"branch": ["master"],
|
"branch": ["master"],
|
||||||
@ -49,3 +58,26 @@ def step(alpinever,tags=[]):
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def notify(versions):
|
||||||
|
return {
|
||||||
|
"kind": "pipeline",
|
||||||
|
"name": "notify",
|
||||||
|
"depends_on": versions,
|
||||||
|
"when": {
|
||||||
|
"status": [ "success", "failure" ],
|
||||||
|
},
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"name": "notify",
|
||||||
|
"image": "spritsail/notify",
|
||||||
|
"environment": {
|
||||||
|
"WEBHOOK_URL": {
|
||||||
|
"from_secret": "webhook_url",
|
||||||
|
},
|
||||||
|
"NOTIFY_TOKEN": {
|
||||||
|
"from_secret": "notify_token",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ARG ALPINE_TAG=3.13
|
ARG ALPINE_TAG=3.11
|
||||||
|
|
||||||
FROM alpine:$ALPINE_TAG
|
FROM alpine:$ALPINE_TAG
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user