mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-10 04:06:06 +00:00
test buildah spindle engine
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
# Triggers on version tags (v*) pushed to the repository.
|
||||
|
||||
when:
|
||||
- event: ["push"]
|
||||
- event: ["manual"]
|
||||
tag: ["v*"]
|
||||
|
||||
engine: "nixery"
|
||||
|
||||
@@ -2,15 +2,10 @@
|
||||
# Triggers on version tags and builds cross-platform binaries using buildah
|
||||
|
||||
when:
|
||||
- event: ["manual"]
|
||||
- event: ["push"]
|
||||
tag: ["v*"]
|
||||
|
||||
engine: "nixery"
|
||||
|
||||
dependencies:
|
||||
nixpkgs:
|
||||
- buildah
|
||||
- gnugrep # Required for tag detection
|
||||
engine: "buildah"
|
||||
|
||||
environment:
|
||||
IMAGE_REGISTRY: atcr.io
|
||||
@@ -37,19 +32,19 @@ steps:
|
||||
echo "Building version: $TAG"
|
||||
echo "$TAG" > .version
|
||||
|
||||
- name: Setup build environment
|
||||
- name: Setup registry credentials
|
||||
command: |
|
||||
if ! grep -q "^root:" /etc/passwd 2>/dev/null; then
|
||||
echo "root:x:0:0:root:/root:/bin/sh" >> /etc/passwd
|
||||
fi
|
||||
|
||||
- name: Login to registry
|
||||
command: |
|
||||
echo "${APP_PASSWORD}" | buildah login \
|
||||
--storage-driver vfs \
|
||||
-u "${IMAGE_USER}" \
|
||||
--password-stdin \
|
||||
${IMAGE_REGISTRY}
|
||||
mkdir -p ~/.docker
|
||||
cat > ~/.docker/config.json <<EOF
|
||||
{
|
||||
"auths": {
|
||||
"${IMAGE_REGISTRY}": {
|
||||
"auth": "$(echo -n "${IMAGE_USER}:${APP_PASSWORD}" | base64)"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
chmod 600 ~/.docker/config.json
|
||||
|
||||
- name: Build and push AppView image
|
||||
command: |
|
||||
@@ -62,6 +57,10 @@ steps:
|
||||
--file ./Dockerfile.appview \
|
||||
.
|
||||
|
||||
buildah push \
|
||||
--storage-driver vfs \
|
||||
${IMAGE_REGISTRY}/${IMAGE_USER}/atcr-appview:${TAG}
|
||||
|
||||
buildah push \
|
||||
--storage-driver vfs \
|
||||
${IMAGE_REGISTRY}/${IMAGE_USER}/atcr-appview:latest
|
||||
@@ -77,6 +76,10 @@ steps:
|
||||
--file ./Dockerfile.hold \
|
||||
.
|
||||
|
||||
buildah push \
|
||||
--storage-driver vfs \
|
||||
${IMAGE_REGISTRY}/${IMAGE_USER}/atcr-hold:${TAG}
|
||||
|
||||
buildah push \
|
||||
--storage-driver vfs \
|
||||
${IMAGE_REGISTRY}/${IMAGE_USER}/atcr-hold:latest
|
||||
|
||||
Reference in New Issue
Block a user