Commit eda8e591 authored by Tim Leers's avatar Tim Leers

Pull haproxy image and verify deployment

parent b3f9323f
......@@ -22,6 +22,19 @@ test:
script:
- make check
# build new haproxy image if dockerfile changes
build:haproxy:
extends: .build-haproxy
# as long as tls is in WIP we only test deployment
rules:
- changes:
- container/Dockerfile.haproxy
# haproxy image can be build when user triggers it
build:haproxy:manual:
extends: .build-haproxy
when: manual
# build new varnish image if dockerfile changes
build:varnish:
extends: .build-varnish
......@@ -57,6 +70,7 @@ integration:
needs: ["build:controller"]
stage: e2e
image: docker:19.03.8
retry: 2
services:
- docker:19.03.8-dind
variables:
......@@ -79,13 +93,42 @@ integration:
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker pull $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/controller:$CI_COMMIT_SHA
# using varnish image with latest tag due to performance. if we are changing this image a lot, we need to improve this as can lead to pulling the incorrect image
# using varnish and haproxy image with latest tag due to performance. if we are changing this image a lot, we need to improve this as can lead to pulling the incorrect image
- docker pull $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/varnish:latest
- docker pull $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/haproxy:latest
- docker tag $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/controller:$CI_COMMIT_SHA varnish-ingress/controller
- docker tag $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/varnish:latest varnish-ingress/varnish
- docker tag $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/haproxy:latest varnish-ingress/haproxy
- kind load docker-image varnish-ingress/varnish
- kind load docker-image varnish-ingress/haproxy
- kind load docker-image varnish-ingress/controller
- test/e2e.sh
- cd deploy
- ./init.sh
- ./deploy.sh
- ./verify.sh
# as long as tls is in WIP we only test deployment
# - test/e2e.sh
# basic step for a pipeline to build the varnish image
.build-haproxy:
stage: build
image: docker:19.03.8
services:
- docker:19.03.8-dind
variables:
IMAGE: haproxy
before_script:
- apk add -U make
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker pull $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/varnish-ingress/$IMAGE:latest || true
- cd container
- make haproxy
- docker tag varnish-ingress/$IMAGE $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/$IMAGE:$CI_COMMIT_SHA
- docker tag varnish-ingress/$IMAGE $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/$IMAGE:latest
- docker push $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/$IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY/timleers/k8s-ingress/varnish-ingress/$IMAGE:latest
# basic step for a pipeline to build the varnish image
.build-varnish:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment