Skip to content

Commit e425baf

Browse files
committed
Load images from ci build cache
Signed-off-by: Ricardo Lopes <ricardoapl.dev@gmail.com>
1 parent ec239c6 commit e425baf

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,18 @@ jobs:
193193
export TAGNGINX=$(cat images/nginx/TAG)
194194
make BASE_IMAGE=registry.k8s.io/ingress-nginx/nginx:${TAGNGINX} clean-image build image image-chroot
195195
make -C test/e2e-image image
196+
cd images/custom-error-pages/rootfs && docker image build \
197+
--build-arg=BASE_IMAGE=registry.k8s.io/ingress-nginx/nginx-1.25:${TAGNGINX} \
198+
--build-arg GOLANG_VERSION=$(cat ../../../GOLANG_VERSION) \
199+
--tag ingress-controller/custom-error-pages:1.0.0-dev . \
200+
&& cd ../../..
196201
197202
echo "creating images cache..."
198203
docker save \
199204
nginx-ingress-controller:e2e \
200205
ingress-controller/controller:1.0.0-dev \
201206
ingress-controller/controller-chroot:1.0.0-dev \
207+
ingress-controller/custom-error-pages:1.0.0-dev \
202208
| gzip > docker.tar.gz
203209
204210
- name: cache

.github/workflows/zz-tmpl-k8s-e2e.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
SKIP_CLUSTER_CREATION: true
4444
SKIP_INGRESS_IMAGE_CREATION: true
4545
SKIP_E2E_IMAGE_CREATION: true
46+
SKIP_CUSTOMERRORPAGES_IMAGE_CREATION: true
47+
ENABLE_VALIDATIONS: ${{ inputs.variation == 'VALIDATIONS' }}
4648
IS_CHROOT: ${{ inputs.variation == 'CHROOT' }}
4749
run: |
4850
kind get kubeconfig > $HOME/.kube/kind-config-kind

images/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ EXTRAARGS ?= $(shell cat $(NAME)/EXTRAARGS)
4141
export DOCKER_CLI_EXPERIMENTAL=enabled
4242

4343
# build with buildx
44-
PLATFORMS?=linux/amd64,linux/arm,linux/arm64
45-
OUTPUT=
46-
PROGRESS=plain
44+
BUILDX_PLATFORMS ?= linux/amd64,linux/arm,linux/arm64,linux/s390x
45+
OUTPUT ?=
46+
PROGRESS = plain
4747

4848

4949
precheck:
@@ -58,7 +58,7 @@ build: precheck ensure-buildx
5858
--label=org.opencontainers.image.description="Ingress NGINX $(NAME) image" \
5959
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
6060
--build-arg GOLANG_VERSION=$(GO_VERSION) \
61-
--platform=${PLATFORMS} $(OUTPUT) \
61+
--platform=${BUILDX_PLATFORMS} $(OUTPUT) \
6262
--progress=$(PROGRESS) \
6363
--pull $(EXTRAARGS) \
6464
-t $(IMAGE):$(TAG) $(NAME)/rootfs

test/e2e/CUSTOMERRORPAGES_IMAGE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
localhost/custom-error-pages:e2e
1+
ingress-controller/custom-error-pages:1.0.0-dev

test/e2e/run-kind-e2e.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ fi
107107

108108
if [ "${SKIP_CUSTOMERRORPAGES_IMAGE_CREATION}" = "false" ]; then
109109
echo "[dev-env] building custom-error-pages image"
110-
REGISTRY=localhost NAME=custom-error-pages TAG=e2e make -C "${DIR}"/../../images build
110+
make NAME=custom-error-pages -C "${DIR}"/../../images build
111111
echo "[dev-env] .. done building custom-error-pages image"
112112
fi
113113

@@ -118,6 +118,6 @@ echo "[dev-env] copying docker images to cluster..."
118118

119119
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" nginx-ingress-controller:e2e
120120
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" "${REGISTRY}"/controller:"${TAG}"
121-
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" "localhost/custom-error-pages:e2e"
121+
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" "${REGISTRY}"/custom-error-pages:"${TAG}"
122122
echo "[dev-env] running e2e tests..."
123123
make -C "${DIR}"/../../ e2e-test

0 commit comments

Comments
 (0)