From 9eaf4f953078054e79e53581798e0a2cfc1f12f9 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Sun, 31 May 2026 18:33:19 +0300 Subject: [PATCH 1/4] move before nginx work to potentially save cache layers --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 244b04b..0d40741 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,7 @@ FROM debian:bookworm-slim LABEL org.opencontainers.image.source="https://github.com/wpelevator/ngx_cache_pilot" LABEL org.opencontainers.image.description="Debian development environment for ngx_cache_pilot" -ARG NGINX_VERSION=1.25.5 - ENV DEBIAN_FRONTEND=noninteractive -ENV NGINX_VERSION=${NGINX_VERSION} -ENV NGINX_SRC_DIR=/opt/nginx-src/nginx-${NGINX_VERSION} ENV NGINX_BUILD_PREFIX=/opt/nginx ENV PATH=${NGINX_BUILD_PREFIX}/sbin:${PATH} @@ -27,6 +23,11 @@ RUN apt-get update \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* + +ARG NGINX_VERSION=1.25.5 +ENV NGINX_VERSION=${NGINX_VERSION} +ENV NGINX_SRC_DIR=/opt/nginx-src/nginx-${NGINX_VERSION} + RUN mkdir -p /opt/nginx-src \ && curl -fsSLo /tmp/nginx.tar.gz "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" \ && tar -xzf /tmp/nginx.tar.gz -C /opt/nginx-src \ From 621640c59cbcdc525e8cb8c80f1c60f5966474d9 Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Sun, 31 May 2026 18:34:05 +0300 Subject: [PATCH 2/4] pull in perl deps via package manager --- Dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d40741..e3370ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ ENV DEBIAN_FRONTEND=noninteractive ENV NGINX_BUILD_PREFIX=/opt/nginx ENV PATH=${NGINX_BUILD_PREFIX}/sbin:${PATH} +# Perl packages below are dependencies for openresty/test-nginx. RUN apt-get update \ && apt-get install -y --no-install-recommends \ astyle \ @@ -19,10 +20,19 @@ RUN apt-get update \ git \ libpcre3-dev \ libssl-dev \ + libipc-run-perl \ + liblist-moreutils-perl \ + libtest-base-perl \ + libtest-longstring-perl \ + libtext-diff-perl \ + liburi-perl \ + libwww-perl \ perl \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* +RUN git clone --depth=1 --branch v0.32 https://github.com/openresty/test-nginx.git /opt/test-nginx \ + && cpanm --notest /opt/test-nginx ARG NGINX_VERSION=1.25.5 ENV NGINX_VERSION=${NGINX_VERSION} @@ -33,9 +43,6 @@ RUN mkdir -p /opt/nginx-src \ && tar -xzf /tmp/nginx.tar.gz -C /opt/nginx-src \ && rm /tmp/nginx.tar.gz -RUN git clone --depth=1 --branch v0.32 https://github.com/openresty/test-nginx.git /opt/test-nginx \ - && cpanm --notest /opt/test-nginx - RUN cd "${NGINX_SRC_DIR}" \ && ./configure \ --prefix="${NGINX_BUILD_PREFIX}" \ From 5119303e20e738f7f76876405e23b1d1707b3d7b Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Sun, 31 May 2026 18:34:55 +0300 Subject: [PATCH 3/4] bump and prefix --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a05e1cf..5c13d23 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: dev: - image: ghcr.io/wpelevator/ngx-cache-pilot--dev:${NGINX_VERSION:-1.25.5} + image: ghcr.io/wpelevator/ngx-cache-pilot--dev:1.0.0-nginx-${NGINX_VERSION:-1.25.5} build: context: . args: @@ -9,7 +9,7 @@ services: volumes: - .:/workspace packaging: - image: ghcr.io/wpelevator/ngx-cache-pilot--packaging:1.0.1 + image: ghcr.io/wpelevator/ngx-cache-pilot--packaging:1.0.2 build: context: . dockerfile: Dockerfile.packaging From a3a956d668e68e8a4c3ecdee71d3c8778403234d Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Sun, 31 May 2026 18:43:01 +0300 Subject: [PATCH 4/4] account for the dot-folder --- .github/workflows/bench.yml | 4 ++-- .github/workflows/ci.yml | 2 +- .github/workflows/publish-launchpad-ppa.yml | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index f1a9cbf..3f33bbb 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -39,12 +39,12 @@ jobs: run: docker compose run --rm dev make bench-quick - name: Upload benchmark artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: bench-results-nginx-${{ matrix.nginx_version }} + if-no-files-found: error path: | bench/results/latest/summary.json bench/results/latest/summary.txt bench/results/latest/*.json bench/results/latest/*.log - if-no-files-found: error diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06e345c..f1217fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,7 @@ jobs: uses: actions/upload-artifact@v7 with: name: debian-package-artifacts + if-no-files-found: error include-hidden-files: true path: | .pkg-build/libnginx-mod-http-cache-pilot_*.buildinfo @@ -68,4 +69,3 @@ jobs: .pkg-build/libnginx-mod-http-cache-pilot_*.deb .pkg-build/libnginx-mod-http-cache-pilot_*.dsc .pkg-build/libnginx-mod-http-cache-pilot_*.tar.* - if-no-files-found: error diff --git a/.github/workflows/publish-launchpad-ppa.yml b/.github/workflows/publish-launchpad-ppa.yml index 1158c77..ac1adcd 100644 --- a/.github/workflows/publish-launchpad-ppa.yml +++ b/.github/workflows/publish-launchpad-ppa.yml @@ -18,6 +18,7 @@ permissions: jobs: source-tarball: + name: Build source tarball runs-on: ubuntu-24.04 steps: @@ -34,6 +35,7 @@ jobs: uses: actions/upload-artifact@v7 with: name: launchpad-orig-tarball + include-hidden-files: true path: .pkg-build/libnginx-mod-http-cache-pilot_*.orig.tar.gz if-no-files-found: error @@ -81,13 +83,13 @@ jobs: - name: Upload source package artifacts if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: launchpad-source-${{ matrix.series }} + if-no-files-found: error include-hidden-files: true path: | .pkg-build/libnginx-mod-http-cache-pilot_*.buildinfo .pkg-build/libnginx-mod-http-cache-pilot_*.changes .pkg-build/libnginx-mod-http-cache-pilot_*.dsc .pkg-build/libnginx-mod-http-cache-pilot_*.tar.* - if-no-files-found: error