Commit 0d74fd16 authored by Tim Leers's avatar Tim Leers Committed by Tim Leers

Improve ci

parent 2088aa14
...@@ -48,16 +48,12 @@ build:varnish:manual: ...@@ -48,16 +48,12 @@ build:varnish:manual:
when: manual when: manual
build:controller: build:controller:
extends: .build-image
stage: build stage: build
image: docker:19.03.8
services:
- docker:19.03.8-dind
variables: variables:
IMAGE: controller IMAGE: controller
before_script:
- apk add -U make
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script: script:
<<<<<<< HEAD
- docker pull $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:latest || true - docker pull $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:latest || true
- cd container - cd container
- make controller - make controller
...@@ -138,6 +134,83 @@ example:custom-vcl: ...@@ -138,6 +134,83 @@ example:custom-vcl:
- ./verify.sh - ./verify.sh
- ./undeploy.sh - ./undeploy.sh
=======
- cd container
- make controller
example:hello:
extends: .integration-tests
script:
- cd ../examples/hello
- ./deploy.sh
- ./verify.sh
- ./undeploy.sh
example:namespace:
extends: .integration-tests
script:
- cd ../examples/namespace
- ./deploy.sh
- ./verify.sh
- ./undeploy.sh
example:architectures:cluster-and-ns-wide:
extends: .integration-tests
script:
- cd ../examples/architectures/cluster-and-ns-wide
- ./deploy.sh
- ./verify.sh
- ./undeploy.sh
example:architectures:clusterwide:
extends: .integration-tests
script:
- cd ../examples/architectures/clusterwide
- ./deploy.sh
- ./verify.sh
- ./undeploy.sh
example:architectures:multi-controller:
extends: .integration-tests
script:
- cd ../examples/architectures/multi-controller
- ./deploy.sh
- ./verify.sh
- ./undeploy.sh
example:architectures:multi-varnish-ns:
extends: .integration-tests
script:
- cd ../examples/architectures/multi-varnish-ns
- ./deploy.sh
- ./verify.sh
- ./undeploy.sh
example:acl:
extends: .integration-tests
script:
- cd ../examples/acl
- ./deploy.sh
- ./verify.sh
- ./undeploy.sh
example:backend-config:
extends: .integration-tests
script:
- cd ../examples/backend-config
- ./deploy.sh
- ./verify.sh
- ./undeploy.sh
example:custom-vcl:
extends: .integration-tests
script:
- cd ../examples/custom-vcl
- ./deploy.sh
- ./verify.sh
- ./undeploy.sh
>>>>>>> 6b0dc5f... Improve ci
example:rewrite: example:rewrite:
extends: .integration-tests extends: .integration-tests
script: script:
...@@ -177,9 +250,49 @@ example:authentication:proxy: ...@@ -177,9 +250,49 @@ example:authentication:proxy:
- ./deploy_proxy_auth.sh - ./deploy_proxy_auth.sh
- ./verify_proxy_auth.sh - ./verify_proxy_auth.sh
- ./undeploy_proxy_auth.sh - ./undeploy_proxy_auth.sh
# TODO
# req-disposition example:req-disposition:
# varnish_pod_template extends: .integration-tests
script:
- cd ../examples/req-disposition
- ./deploy_alt-builtin.sh
- ./verify_alt-builtin.sh
- ./undeploy_alt-builtin.sh
- ./deploy_builtin.sh
- ./verify_builtin.sh
- ./undeploy_builtin.sh
- ./deploy_cacheability.sh
- ./verify_cacheability.sh
- ./undeploy_cacheability.sh
- ./deploy_pass-on-session-cookie.sh
- ./verify_pass-on-session-cookie.sh
- ./undeploy_pass-on-session-cookie.sh
- ./deploy_url-whitelist.sh
- ./verify_url-whitelist.sh
- ./undeploy_url-whitelist.sh
- ./deploy_purge.sh
- ./verify_purge.sh
- ./undeploy_purge.sh
example:varnish-pod-template:
extends: .integration-tests
script:
- cd ../examples/varnish_pod_template
- ./deploy_cli-args.sh
- ./verify_cli-args.sh
- ./deploy_env.sh
- ./verify_env.sh
- ./deploy_proxy.sh
- ./verify_proxy.sh
- ./undeploy.sh
.integration-tests: .integration-tests:
needs: ["build:controller"] needs: ["build:controller"]
stage: e2e stage: e2e
...@@ -242,19 +355,26 @@ example:authentication:proxy: ...@@ -242,19 +355,26 @@ example:authentication:proxy:
# basic step for a pipeline to build the varnish image # basic step for a pipeline to build the varnish image
.build-varnish: .build-varnish:
extends: .build-image
stage: build
variables:
IMAGE: varnish
script:
- cd container
- make varnish
.build-image:
stage: build stage: build
image: docker:19.03.8 image: docker:19.03.8
services: services:
- docker:19.03.8-dind - docker:19.03.8-dind
variables: variables:
IMAGE: varnish IMAGE: BASIC
before_script: before_script:
- apk add -U make - apk add -U make
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker pull $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:latest || true - docker pull $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:latest || true
- cd container after_script:
- make varnish
- docker tag varnish-ingress/$IMAGE $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:$CI_COMMIT_SHA - docker tag varnish-ingress/$IMAGE $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:$CI_COMMIT_SHA
- docker tag varnish-ingress/$IMAGE $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:latest - docker tag varnish-ingress/$IMAGE $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:latest
- docker push $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:$CI_COMMIT_SHA - docker push $CI_REGISTRY_IMAGE/varnish-ingress/$IMAGE:$CI_COMMIT_SHA
......
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