Allow proxy and container repository customization

Modify following roles to accept the proxy and env
variables from zuul jobs and project manifest so they
can be overwritten to run them on downstream zuul

- airshipctl-build-images
- airshipctl-publish-images

Change-Id: Ied06e60507f125c60ca7b9d47331e967fd69bf14
This commit is contained in:
Dinesh Garg 2020-10-30 08:29:37 +00:00
parent 334ff8041b
commit 396a160271
4 changed files with 18 additions and 1 deletions

View File

@ -14,6 +14,10 @@
make:
chdir: "{{ zuul.project.src_dir }}"
target: images
params:
PROXY: "{{ proxy.http }}"
NO_PROXY: "{{ proxy.noproxy }}"
USE_PROXY: "{{ proxy.enabled | lower }}"
- name: Verify Image Exists
shell: docker image inspect "$(make print-docker-image-tag)"

View File

@ -34,6 +34,10 @@
params:
DOCKER_IMAGE_TAG: latest
PUBLISH: "true"
PROXY: "{{ proxy.http }}"
NO_PROXY: "{{ proxy.noproxy }}"
USE_PROXY: "{{ proxy.enabled | lower }}"
DOCKER_REGISTRY: "{{ image_repo }}"
target: images
- name: Push Image with Commit Tag
@ -42,4 +46,8 @@
params:
DOCKER_IMAGE_TAG: "{{ zuul.newrev }}"
PUBLISH: "true"
PROXY: "{{ proxy.http }}"
NO_PROXY: "{{ proxy.noproxy }}"
USE_PROXY: "{{ proxy.enabled | lower }}"
DOCKER_REGISTRY: "{{ image_repo }}"
target: images

View File

@ -198,4 +198,3 @@
pass-to-parent: true
vars:
image: quay.io/airshipit/airshipctl
image_repo: https://quay.io/api/v1/

View File

@ -13,6 +13,12 @@
- project:
vars:
sphinx_build_dir: docs/build
proxy:
enabled: false
http: ""
https: ""
noproxy: ""
image_repo: https://quay.io/api/v1/
check:
jobs:
- openstack-tox-docs: &docs