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: make:
chdir: "{{ zuul.project.src_dir }}" chdir: "{{ zuul.project.src_dir }}"
target: images target: images
params:
PROXY: "{{ proxy.http }}"
NO_PROXY: "{{ proxy.noproxy }}"
USE_PROXY: "{{ proxy.enabled | lower }}"
- name: Verify Image Exists - name: Verify Image Exists
shell: docker image inspect "$(make print-docker-image-tag)" shell: docker image inspect "$(make print-docker-image-tag)"

View File

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

View File

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

View File

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