Compare commits
4 Commits
9dcba526aa
...
0c395558dc
| Author | SHA1 | Date | |
|---|---|---|---|
|
0c395558dc
|
|||
|
4afbbadd8a
|
|||
|
b11112867a
|
|||
|
29df060ce4
|
@@ -15,9 +15,10 @@ steps:
|
|||||||
image: alpine
|
image: alpine
|
||||||
privileged: true
|
privileged: true
|
||||||
environment:
|
environment:
|
||||||
BUILDAH_REG: zot.badhouseplants.net/badhouseplants/badhouseplants-builder
|
BUILDAH_REG: gitea.badhouseplants.net/badhouseplants/container-builder
|
||||||
REGISTRY_TOKEN:
|
REGISTRY_TOKEN:
|
||||||
from_secret: registry_token
|
from_secret: GITEA_REGISTRY_TOKEN
|
||||||
|
REGISTRY_USER: devops-bot
|
||||||
commands:
|
commands:
|
||||||
- ./build
|
- ./build
|
||||||
backend_options:
|
backend_options:
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
FROM registry.hub.docker.com/rclone/rclone AS rclone
|
|
||||||
WORKDIR /out
|
|
||||||
RUN cp $(which rclone) /out/rclone
|
|
||||||
|
|
||||||
FROM registry.hub.docker.com/argoproj/argocd as argocd
|
|
||||||
WORKDIR /out
|
|
||||||
RUN cp $(which argocd) /out/argocd
|
|
||||||
|
|
||||||
|
|
||||||
FROM registry.hub.docker.com/library/alpine
|
FROM registry.hub.docker.com/library/alpine
|
||||||
RUN apk update --no-cache&&\
|
RUN apk update --no-cache &&\
|
||||||
apk add yq gettext openssl curl jq perl git git-lfs netavark\
|
apk add yq gettext openssl curl jq perl git git-lfs netavark\
|
||||||
buildah cni-plugins iptables ip6tables fuse-overlayfs --no-cache
|
buildah cni-plugins iptables ip6tables fuse-overlayfs --no-cache
|
||||||
COPY --from=rclone /out/rclone /usr/bin/rclone
|
|
||||||
COPY --from=argocd /out/argocd /usr/bin/argocd
|
|
||||||
COPY ./scripts/ /usr/bin/
|
COPY ./scripts/ /usr/bin/
|
||||||
|
|||||||
14
build
14
build
@@ -21,14 +21,18 @@
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
echo "23.03.2025"
|
echo "26.11.2025"
|
||||||
apk update
|
apk update
|
||||||
apk add buildah cni-plugins iptables ip6tables fuse-overlayfs netavark
|
apk add buildah cni-plugins iptables ip6tables fuse-overlayfs netavark
|
||||||
|
|
||||||
buildah login -u woody -p $REGISTRY_TOKEN zot.badhouseplants.net
|
buildah login -u $REGISTRY_USER -p $REGISTRY_TOKEN gitea.badhouseplants.net
|
||||||
buildah build -t $BUILDAH_REG:$CI_COMMIT_SHA .
|
buildah build -t $BUILDAH_REG:$CI_COMMIT_SHA .
|
||||||
buildah tag $BUILDAH_REG:$CI_COMMIT_SHA $BUILDAH_REG:latest
|
|
||||||
if [ -z ${BUILD_DEBUG+x} ]; then
|
if [ -z ${BUILD_DEBUG+x} ]; then
|
||||||
buildah push $BUILDAH_REG:$CI_COMMIT_SHA;
|
buildah push $BUILDAH_REG:$CI_COMMIT_SHA;
|
||||||
buildah push $BUILDAH_REG:latest;
|
fi
|
||||||
|
|
||||||
|
if [ ${CI_COMMIT_BRANCH} = ${CI_REPO_DEFAULT_BRANCH} ]; then
|
||||||
|
buildah tag $BUILDAH_REG:$CI_COMMIT_SHA $BUILDAH_REG:latest
|
||||||
|
buildah push $BUILDAH_REG:latest;
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ chomp($git_commit_sha);
|
|||||||
# -- Build the image with SHA tag
|
# -- Build the image with SHA tag
|
||||||
# -- my main build system is DRONE, so I'm using DRONE variables a lot
|
# -- my main build system is DRONE, so I'm using DRONE variables a lot
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
my $container_registry = $ENV{'CONTAINER_REGISTRY'} || 'zot.badhouseplants.net';
|
my $container_registry = $ENV{'CONTAINER_REGISTRY'} || 'gitea.badhouseplants.net';
|
||||||
my $image_name = $ENV{'PACKAGE_NAME'} | $ENV{'DRONE_REPO'} || "badhouseplants/badhouseplants-net";
|
my $image_name = $ENV{'PACKAGE_NAME'} | $ENV{'DRONE_REPO'} || "badhouseplants/badhouseplants-net";
|
||||||
my $tag = "$container_registry/$image_name:$git_commit_sha";
|
my $tag = "$container_registry/$image_name:$git_commit_sha";
|
||||||
my $custom_tag = $ENV{'CUSTOM_TAG'} || "";
|
my $custom_tag = $ENV{'CUSTOM_TAG'} || "";
|
||||||
|
|||||||
Reference in New Issue
Block a user