Compare commits
7 Commits
renovate/c
...
main
Author | SHA1 | Date | |
---|---|---|---|
4a3c7bff5e | |||
c3aa829a17 | |||
d52006f8e8 | |||
c240c28dfa | |||
d5491ae2a7 | |||
81b3e435a3 | |||
0e1ff2e22e |
@ -5,8 +5,8 @@ when:
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- NAME: ARM
|
# - NAME: ARM
|
||||||
ARCH: arm64
|
# ARCH: arm64
|
||||||
- NAME: AMD
|
- NAME: AMD
|
||||||
ARCH: amd64
|
ARCH: amd64
|
||||||
|
|
||||||
@ -15,11 +15,11 @@ steps:
|
|||||||
image: alpine
|
image: alpine
|
||||||
privileged: true
|
privileged: true
|
||||||
environment:
|
environment:
|
||||||
BUILDAH_REG: gitea.badhouseplants.net/badhouseplants/badhouseplants-builder
|
BUILDAH_REG: zot.badhouseplants.net/badhouseplants/badhouseplants-builder
|
||||||
commands:
|
commands:
|
||||||
- ./build
|
- ./build
|
||||||
secrets:
|
secrets:
|
||||||
- gitea_token
|
- registry_token
|
||||||
backend_options:
|
backend_options:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
resources:
|
resources:
|
||||||
@ -34,10 +34,10 @@ steps:
|
|||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/arch: "${ARCH}"
|
kubernetes.io/arch: "${ARCH}"
|
||||||
cleanup:
|
cleanup:
|
||||||
image: gitea.badhouseplants.net/badhouseplants/badhouseplants-builder:latest
|
image: zot.badhouseplants.net/badhouseplants/badhouseplants-builder:latest
|
||||||
secrets:
|
secrets:
|
||||||
- gitea_token
|
- registry_token
|
||||||
environment:
|
environment:
|
||||||
BUILDAH_REG: gitea.badhouseplants.net/badhouseplants/badhouseplants-builder
|
BUILDAH_REG: zot.badhouseplants.net/badhouseplants/badhouseplants-builder
|
||||||
commands:
|
commands:
|
||||||
- cleanup
|
- cleanup
|
||||||
|
2
build
2
build
@ -25,7 +25,7 @@ echo "24.07.2024"
|
|||||||
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 allanger -p $GITEA_TOKEN gitea.badhouseplants.net
|
buildah login -u woody -p $REGISTRY_TOKEN zot.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
|
buildah tag $BUILDAH_REG:$CI_COMMIT_SHA $BUILDAH_REG:latest
|
||||||
if [ -z ${BUILD_DEBUG+x} ]; then
|
if [ -z ${BUILD_DEBUG+x} ]; then
|
||||||
|
@ -35,12 +35,12 @@ 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'} || 'git.badhouseplants.net';
|
my $container_registry = $ENV{'CONTAINER_REGISTRY'} || 'zot.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'} || "";
|
||||||
my $username = $ENV{'DRONE_USERNAME'} || "allanger";
|
my $username = "woody";
|
||||||
my $password = $ENV{'GITEA_TOKEN'} || "YOU NOT AUTHORIZED, PAL";
|
my $password = $ENV{'REGISTRY_TOKEN'} || "YOU NOT AUTHORIZED, PAL";
|
||||||
my $containerfile = $ENV{'CONTAINERFILE'} || "Containerfile";
|
my $containerfile = $ENV{'CONTAINERFILE'} || "Containerfile";
|
||||||
my $args = $ENV{'BUILD_ARGS'};
|
my $args = $ENV{'BUILD_ARGS'};
|
||||||
0 == system ("buildah login --username $username --password $password $container_registry") or die $!;
|
0 == system ("buildah login --username $username --password $password $container_registry") or die $!;
|
||||||
|
@ -25,12 +25,12 @@ use warnings;
|
|||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
# -- Gitea variables
|
# -- Gitea variables
|
||||||
# --------------------------------------
|
# --------------------------------------
|
||||||
my $gitea_url=$ENV{'GITEA_URL'} || 'https://git.badhouseplants.net/api/v1';
|
my $gitea_url=$ENV{'GITEA_URL'} || 'https://zot.badhouseplants.net/api/v1';
|
||||||
my $gitea_org=$ENV{'DRONE_REPO_NAMESPACE'} || 'badhouseplants';
|
my $gitea_org=$ENV{'DRONE_REPO_NAMESPACE'} || 'badhouseplants';
|
||||||
my $gitea_package=$ENV{'DRONE_REPO_NAME'} || 'badhouseplants-net';
|
my $gitea_package=$ENV{'DRONE_REPO_NAME'} || 'badhouseplants-net';
|
||||||
my $gitea_api="$gitea_url/packages/$gitea_org/container/$gitea_package";
|
my $gitea_api="$gitea_url/packages/$gitea_org/container/$gitea_package";
|
||||||
my $gitea_list_api="$gitea_url/packages/$gitea_org?page=1&type=container&q=$gitea_package";
|
my $gitea_list_api="$gitea_url/packages/$gitea_org?page=1&type=container&q=$gitea_package";
|
||||||
my $gitea_token=$ENV{'GITEA_TOKEN'};
|
my $gitea_token=$ENV{'REGISTRY_TOKEN'};
|
||||||
my $gitea_user=$ENV{'GITEA_USER'} || $ENV{'DRONE_COMMIT_AUTHOR'};
|
my $gitea_user=$ENV{'GITEA_USER'} || $ENV{'DRONE_COMMIT_AUTHOR'};
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# -- Get tags from Gitea
|
# -- Get tags from Gitea
|
||||||
@ -85,4 +85,4 @@ if (defined $ENV{CLEANUP_MINIO}) {
|
|||||||
print "$output \n";
|
print "$output \n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user