Load images from ci build cache
Signed-off-by: Ricardo Lopes <ricardoapl.dev@gmail.com>
This commit is contained in:
parent
ec239c69a9
commit
e425baf734
5 changed files with 15 additions and 7 deletions
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
|
@ -193,12 +193,18 @@ jobs:
|
||||||
export TAGNGINX=$(cat images/nginx/TAG)
|
export TAGNGINX=$(cat images/nginx/TAG)
|
||||||
make BASE_IMAGE=registry.k8s.io/ingress-nginx/nginx:${TAGNGINX} clean-image build image image-chroot
|
make BASE_IMAGE=registry.k8s.io/ingress-nginx/nginx:${TAGNGINX} clean-image build image image-chroot
|
||||||
make -C test/e2e-image image
|
make -C test/e2e-image image
|
||||||
|
cd images/custom-error-pages/rootfs && docker image build \
|
||||||
|
--build-arg=BASE_IMAGE=registry.k8s.io/ingress-nginx/nginx-1.25:${TAGNGINX} \
|
||||||
|
--build-arg GOLANG_VERSION=$(cat ../../../GOLANG_VERSION) \
|
||||||
|
--tag ingress-controller/custom-error-pages:1.0.0-dev . \
|
||||||
|
&& cd ../../..
|
||||||
|
|
||||||
echo "creating images cache..."
|
echo "creating images cache..."
|
||||||
docker save \
|
docker save \
|
||||||
nginx-ingress-controller:e2e \
|
nginx-ingress-controller:e2e \
|
||||||
ingress-controller/controller:1.0.0-dev \
|
ingress-controller/controller:1.0.0-dev \
|
||||||
ingress-controller/controller-chroot:1.0.0-dev \
|
ingress-controller/controller-chroot:1.0.0-dev \
|
||||||
|
ingress-controller/custom-error-pages:1.0.0-dev \
|
||||||
| gzip > docker.tar.gz
|
| gzip > docker.tar.gz
|
||||||
|
|
||||||
- name: cache
|
- name: cache
|
||||||
|
|
2
.github/workflows/zz-tmpl-k8s-e2e.yaml
vendored
2
.github/workflows/zz-tmpl-k8s-e2e.yaml
vendored
|
@ -43,6 +43,8 @@ jobs:
|
||||||
SKIP_CLUSTER_CREATION: true
|
SKIP_CLUSTER_CREATION: true
|
||||||
SKIP_INGRESS_IMAGE_CREATION: true
|
SKIP_INGRESS_IMAGE_CREATION: true
|
||||||
SKIP_E2E_IMAGE_CREATION: true
|
SKIP_E2E_IMAGE_CREATION: true
|
||||||
|
SKIP_CUSTOMERRORPAGES_IMAGE_CREATION: true
|
||||||
|
ENABLE_VALIDATIONS: ${{ inputs.variation == 'VALIDATIONS' }}
|
||||||
IS_CHROOT: ${{ inputs.variation == 'CHROOT' }}
|
IS_CHROOT: ${{ inputs.variation == 'CHROOT' }}
|
||||||
run: |
|
run: |
|
||||||
kind get kubeconfig > $HOME/.kube/kind-config-kind
|
kind get kubeconfig > $HOME/.kube/kind-config-kind
|
||||||
|
|
|
@ -41,9 +41,9 @@ EXTRAARGS ?= $(shell cat $(NAME)/EXTRAARGS)
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||||
|
|
||||||
# build with buildx
|
# build with buildx
|
||||||
PLATFORMS?=linux/amd64,linux/arm,linux/arm64
|
BUILDX_PLATFORMS ?= linux/amd64,linux/arm,linux/arm64,linux/s390x
|
||||||
OUTPUT=
|
OUTPUT ?=
|
||||||
PROGRESS=plain
|
PROGRESS = plain
|
||||||
|
|
||||||
|
|
||||||
precheck:
|
precheck:
|
||||||
|
@ -58,7 +58,7 @@ build: precheck ensure-buildx
|
||||||
--label=org.opencontainers.image.description="Ingress NGINX $(NAME) image" \
|
--label=org.opencontainers.image.description="Ingress NGINX $(NAME) image" \
|
||||||
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
|
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
|
||||||
--build-arg GOLANG_VERSION=$(GO_VERSION) \
|
--build-arg GOLANG_VERSION=$(GO_VERSION) \
|
||||||
--platform=${PLATFORMS} $(OUTPUT) \
|
--platform=${BUILDX_PLATFORMS} $(OUTPUT) \
|
||||||
--progress=$(PROGRESS) \
|
--progress=$(PROGRESS) \
|
||||||
--pull $(EXTRAARGS) \
|
--pull $(EXTRAARGS) \
|
||||||
-t $(IMAGE):$(TAG) $(NAME)/rootfs
|
-t $(IMAGE):$(TAG) $(NAME)/rootfs
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
localhost/custom-error-pages:e2e
|
ingress-controller/custom-error-pages:1.0.0-dev
|
||||||
|
|
|
@ -107,7 +107,7 @@ fi
|
||||||
|
|
||||||
if [ "${SKIP_CUSTOMERRORPAGES_IMAGE_CREATION}" = "false" ]; then
|
if [ "${SKIP_CUSTOMERRORPAGES_IMAGE_CREATION}" = "false" ]; then
|
||||||
echo "[dev-env] building custom-error-pages image"
|
echo "[dev-env] building custom-error-pages image"
|
||||||
REGISTRY=localhost NAME=custom-error-pages TAG=e2e make -C "${DIR}"/../../images build
|
make NAME=custom-error-pages -C "${DIR}"/../../images build
|
||||||
echo "[dev-env] .. done building custom-error-pages image"
|
echo "[dev-env] .. done building custom-error-pages image"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -118,6 +118,6 @@ echo "[dev-env] copying docker images to cluster..."
|
||||||
|
|
||||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" nginx-ingress-controller:e2e
|
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" nginx-ingress-controller:e2e
|
||||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" "${REGISTRY}"/controller:"${TAG}"
|
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" "${REGISTRY}"/controller:"${TAG}"
|
||||||
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" "localhost/custom-error-pages:e2e"
|
kind load docker-image --name="${KIND_CLUSTER_NAME}" --nodes="${KIND_WORKERS}" "${REGISTRY}"/custom-error-pages:"${TAG}"
|
||||||
echo "[dev-env] running e2e tests..."
|
echo "[dev-env] running e2e tests..."
|
||||||
make -C "${DIR}"/../../ e2e-test
|
make -C "${DIR}"/../../ e2e-test
|
||||||
|
|
Loading…
Reference in a new issue