2
0
mirror of https://github.com/spritsail/alpine.git synced 2025-06-14 15:11:12 +00:00

9 Commits

Author SHA1 Message Date
80cdda202e Build amd64/arm64 multiarch images
Signed-off-by: Adam Dodman <adam@adam-ant.co.uk>
Signed-off-by: Joe Groocock <me@frebib.net>
2022-06-17 12:29:39 +00:00
fa09f2867c Update to alpine:3.16
Signed-off-by: Joe Groocock <me@frebib.net>
2022-06-13 14:42:17 +00:00
438819be65 Update to alpine:3.15
Signed-off-by: Joe Groocock <me@frebib.net>
2021-11-24 22:40:53 +00:00
f848ecae6f Update to alpine:3.14
Signed-off-by: Joe Groocock <me@frebib.net>
2021-06-18 08:25:52 +00:00
d7d15ca14d Use https for spritsail alpine repo
http->https redirection seems to be broken in alpine 3.13, and the
repository automatically redirects to https anyway, so being explicit is
probably better, and saves a round-trip and redirect.

Signed-off-by: Joe Groocock <me@frebib.net>
2021-01-23 22:41:24 +00:00
a216ae99b9 Update to alpine:3.13
Signed-off-by: Joe Groocock <me@frebib.net>
2021-01-20 18:10:23 +00:00
7d52c725e4 Update to alpine:3.12
Signed-off-by: Joe Groocock <me@frebib.net>
2020-06-13 16:36:20 +01:00
c936978f39 Update to alpine:3.10
Some checks failed
continuous-integration/drone/push Build is failing
2020-01-08 19:37:08 +00:00
42dc788197 Replace .drone.yml with Starlark 2020-01-08 19:35:27 +00:00
2 changed files with 67 additions and 44 deletions

View File

@ -1,27 +1,47 @@
def main(ctx): repo = "spritsail/alpine"
versions = [ archs = ["amd64", "arm64"]
["3.9",[]], versions = ["edge", "3.14", "3.15", "3.16"]
["3.10",[]], branches = ["master"]
["3.11", ["latest"]],
["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 main(ctx):
builds = []
for ver in versions:
depends_on = []
srctpl = "drone/%s/${DRONE_BUILD_NUMBER}:%s-ARCH" % (ctx.repo.slug, ver)
for arch in archs:
key = "build-%s-%s" % (ver, arch)
tmprepo = "drone/%s/${DRONE_BUILD_NUMBER}:%s-%s" % (ctx.repo.slug, ver, arch)
builds.append(step(ver, arch, key, tmprepo))
depends_on.append(key)
if ctx.build.branch in branches:
tags = []
if ver == versions[-1]:
tags.append("latest")
builds.append(publish(ver, srctpl, depends_on, tags))
return builds
def step(ver, arch, key, tmprepo):
vertest = "grep -q '%s' /etc/alpine-release && " % ver if ver != "edge" else ""
return { return {
"kind": "pipeline", "kind": "pipeline",
"name": "build-%s" % alpinever, "name": key,
"platform": {
"os": "linux",
"arch": arch,
},
"steps": [ "steps": [
{ {
"name": "build", "name": "build",
"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" % ver,
], ],
"repo": tmprepo,
}, },
}, },
{ {
@ -29,8 +49,8 @@ def step(alpinever,tags=[]):
"image": "spritsail/docker-test", "image": "spritsail/docker-test",
"pull": "always", "pull": "always",
"settings": { "settings": {
"repo": "spritsail/alpine", "run": vertest + "su-exec nobody apk --version",
"run": "su-exec nobody apk --version", "repo": tmprepo,
}, },
}, },
{ {
@ -38,46 +58,49 @@ def step(alpinever,tags=[]):
"image": "spritsail/docker-publish", "image": "spritsail/docker-publish",
"pull": "always", "pull": "always",
"settings": { "settings": {
"from": "alpine-dev-%s" % alpinever, "from": tmprepo,
"repo": "spritsail/alpine", "repo": tmprepo,
"tags": [alpinever] + tags, "registry": {"from_secret": "registry_url"},
}, "username": {"from_secret": "registry_username"},
"environment": { "password": {"from_secret": "registry_password"},
"DOCKER_USERNAME": {
"from_secret": "docker_username",
},
"DOCKER_PASSWORD": {
"from_secret": "docker_password",
},
}, },
"when": { "when": {
"branch": ["master"], "branch": branches,
"event": ["push"], "event": ["push"],
}, },
}, },
] ]
} }
def notify(versions): def publish(ver, srctpl, depends, tags=[]):
return { return {
"kind": "pipeline", "kind": "pipeline",
"name": "notify", "name": "publish-%s" % ver,
"depends_on": versions, "depends_on": depends,
"when": { "platform": {
"status": [ "success", "failure" ], "os": "linux",
}, },
"steps": [ "steps": [
{ {
"name": "notify", "name": "publish",
"image": "spritsail/notify", "image": "spritsail/docker-multiarch-publish",
"environment": { "pull": "always",
"WEBHOOK_URL": { "settings": {
"from_secret": "webhook_url", "src_template": srctpl,
}, "src_registry": {"from_secret": "registry_url"},
"NOTIFY_TOKEN": { "src_username": {"from_secret": "registry_username"},
"from_secret": "notify_token", "src_password": {"from_secret": "registry_password"},
}, "dest_repo": repo,
"dest_username": {"from_secret": "docker_username"},
"dest_password": {"from_secret": "docker_password"},
"tags": [ver] + tags,
},
"when": {
"branch": branches,
"event": ["push"],
}, },
}, },
], ]
} }
# vim: ft=python sw=2

View File

@ -1,4 +1,4 @@
ARG ALPINE_TAG=3.11 ARG ALPINE_TAG=3.16
FROM alpine:$ALPINE_TAG FROM alpine:$ALPINE_TAG
@ -18,7 +18,7 @@ COPY skel/ /
ADD https://alpine.spritsail.io/spritsail-alpine.rsa.pub /etc/apk/keys ADD https://alpine.spritsail.io/spritsail-alpine.rsa.pub /etc/apk/keys
ENV ENV="/etc/profile" ENV ENV="/etc/profile"
RUN sed -i '1ihttp://alpine.spritsail.io/spritsail' /etc/apk/repositories \ RUN sed -i '1ihttps://alpine.spritsail.io/spritsail' /etc/apk/repositories \
&& apk --no-cache add \ && apk --no-cache add \
su-exec \ su-exec \
tini tini