From 919c33120866b385fb1718a6119cf03e1c0a1c1c Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Mon, 2 Oct 2023 11:56:09 -0400 Subject: [PATCH] Might finally build a container now --- .woodpecker/.build-perls.yml | 28 +++++++++++++++++++++++++--- generate.pl | 4 +++- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.woodpecker/.build-perls.yml b/.woodpecker/.build-perls.yml index f370d0a..0abab92 100644 --- a/.woodpecker/.build-perls.yml +++ b/.woodpecker/.build-perls.yml @@ -3,8 +3,10 @@ depends_on: - "generate-perl" matrix: + DEBIAN_VERSION: + - bookworm PERL_VERSION: - - 5.20.3 + - 5.020.003 PERL_OPTIONS: - "" - ",threaded" @@ -20,9 +22,29 @@ matrix: # - ",debugging,quadmath" steps: - build: + fetch: image: perl:stable commands: - - echo matrix test! + - wget https://docker-perl-artifacts.minio.voots.org/generated/output.tar.xz + - tar -xvJf output.tar.xz - find output/ + build: + image: woodpeckerci/plugin-docker-buildx:2 + # image: gitea.simcop2387.info/simcop2387/test_env:latest + environment: + IMAGE_VERSION: "${DEBIAN_VERSION}" + settings: + debug: "true" + repo: "gitea.simcop2387.info/simcop2387/perl-container" + dockerfile: "output/perls/${PERL_VERSION}-main${PERL_OPTIONS}-${DEBIAN_VERSION}/Dockerfile" + context: "output/perls/${PERL_VERSION}-main${PERL_OPTIONS}-${DEBIAN_VERSION}" + auto_tag: "false" + tags: + - "${DEBIAN_VERSION}-${PERL_VERSION}${PERL_OPTIONS}-${CI_PIPELINE_CREATED}" + - "${DEBIAN_VERSION}-${PERL_VERSION}${PERL_OPTIONS}" + logins: + - registry: https://gitea.simcop2387.info/ + username: simcop2387 + password: + from_secret: gitea_docker_token diff --git a/generate.pl b/generate.pl index bd6cbc4..edcee5c 100755 --- a/generate.pl +++ b/generate.pl @@ -48,7 +48,7 @@ WORKDIR /usr/src/perl ENV DEBIAN_FRONTEND=noninteractive -RUN curl -SL {{url}} -o perl-{{version}}.tar.{{type}} \ +RUN curl -SL {{cache_url}} -o perl-{{version}}.tar.{{type}} \ && echo '{{sha256}} *perl-{{version}}.tar.{{type}}' | sha256sum -c - \ && tar --strip-components=1 -xaf perl-{{version}}.tar.{{type}} -C /usr/src/perl \ && rm perl-{{version}}.tar.{{type}} \ @@ -146,7 +146,9 @@ for my $release (@{$config->{releases}}) { } for my $build (keys %builds) { + my $file = "perl-$release->{version}.tar.$release->{type}"; $release->{url} = $url; + $release->{cache_url} = "https://docker-perl-artifacts.minio.voots.org/sources/output/downloads/$file"; $release->{"cpanm_dist_$_"} = $cpanm{$_} for keys %cpanm; $release->{extra_flags} ||= '';