Support overrides for internal Zuul setup
Change-Id: Idbf3ed41013d0d2109d96659803642b23a265082
This commit is contained in:
parent
5e346e7be4
commit
03868a46d8
11
Makefile
11
Makefile
@ -12,7 +12,8 @@ DOCKER_IMAGE_TAG ?= latest
|
||||
DOCKER_IMAGE ?= $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_PREFIX)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
|
||||
|
||||
# proxy options
|
||||
PROXY ?= http://proxy.foo.com:8000
|
||||
HTTP_PROXY ?= http://proxy.foo.com:8000
|
||||
HTTPS_PROXY ?= http://proxy.foo.com:8000
|
||||
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
|
||||
USE_PROXY ?= false
|
||||
|
||||
@ -24,10 +25,10 @@ PUBLISH ?= false
|
||||
images:
|
||||
ifeq ($(USE_PROXY), true)
|
||||
@docker build . --tag $(DOCKER_IMAGE) \
|
||||
--build-arg http_proxy=$(PROXY) \
|
||||
--build-arg https_proxy=$(PROXY) \
|
||||
--build-arg HTTP_PROXY=$(PROXY) \
|
||||
--build-arg HTTPS_PROXY=$(PROXY) \
|
||||
--build-arg http_proxy=$(HTTP_PROXY) \
|
||||
--build-arg https_proxy=$(HTTPS_PROXY) \
|
||||
--build-arg HTTP_PROXY=$(HTTP_PROXY) \
|
||||
--build-arg HTTPS_PROXY=$(HTTPS_PROXY) \
|
||||
--build-arg no_proxy=$(NO_PROXY) \
|
||||
--build-arg NO_PROXY=$(NO_PROXY) \
|
||||
--force-rm=$(DOCKER_FORCE_CLEAN)
|
||||
|
@ -13,5 +13,5 @@
|
||||
- hosts: all
|
||||
become: yes
|
||||
roles:
|
||||
- role: ensure-docker
|
||||
- role: docker-install
|
||||
- hostconfig-operator-build-images
|
||||
|
@ -13,5 +13,5 @@
|
||||
- hosts: all
|
||||
become: yes
|
||||
roles:
|
||||
- ensure-docker
|
||||
- docker-install
|
||||
- hostconfig-operator-publish-images
|
||||
|
@ -43,3 +43,6 @@
|
||||
src: "{{ runtime_logs_dir }}"
|
||||
dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}"
|
||||
mode: pull
|
||||
verify_host: true
|
||||
owner: no
|
||||
group: no
|
||||
|
@ -14,8 +14,16 @@
|
||||
make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
target: images
|
||||
params:
|
||||
DOCKER_REGISTRY: "{{ image_repo }}"
|
||||
DOCKER_IMAGE_PREFIX: "{{ docker_image_prefix }}"
|
||||
USE_PROXY: "{{ proxy.enabled | lower }}"
|
||||
HTTP_PROXY: "{{ proxy.http }}"
|
||||
HTTPS_PROXY: "{{ proxy.https }}"
|
||||
DOCKER_IMAGE_TAG: "{{ zuul.change | default('latest') }}"
|
||||
NO_PROXY: "{{ proxy.noproxy }}"
|
||||
|
||||
- name: Verify Image Exists
|
||||
shell: docker image inspect "$(make print-docker-image-tag)"
|
||||
shell: docker image inspect "$(make DOCKER_REGISTRY={{ image_repo }} DOCKER_IMAGE_PREFIX={{ docker_image_prefix }} DOCKER_IMAGE_TAG={{ zuul.change | default('latest') }} print-docker-image-tag)"
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
|
@ -32,8 +32,13 @@
|
||||
make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
params:
|
||||
USE_PROXY: "{{ proxy.enabled | lower }}"
|
||||
HTTP_PROXY: "{{ proxy.http }}"
|
||||
HTTPS_PROXY: "{{ proxy.https }}"
|
||||
NO_PROXY: "{{ proxy.noproxy }}"
|
||||
DOCKER_IMAGE_TAG: latest
|
||||
DOCKER_REGISTRY: "{{ image_repo }}"
|
||||
DOCKER_IMAGE_PREFIX: "{{ docker_image_prefix }}"
|
||||
PUBLISH: "true"
|
||||
target: images
|
||||
|
||||
@ -41,7 +46,12 @@
|
||||
make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
params:
|
||||
USE_PROXY: "{{ proxy.enabled | lower }}"
|
||||
HTTP_PROXY: "{{ proxy.http }}"
|
||||
HTTPS_PROXY: "{{ proxy.https }}"
|
||||
NO_PROXY: "{{ proxy.noproxy }}"
|
||||
DOCKER_IMAGE_TAG: "{{ zuul.newrev }}"
|
||||
DOCKER_REGISTRY: "{{ image_repo }}"
|
||||
DOCKER_IMAGE_PREFIX: "{{ docker_image_prefix }}"
|
||||
PUBLISH: "true"
|
||||
target: images
|
||||
|
@ -53,9 +53,6 @@
|
||||
- name: hostconfig_operator_image_repo_credentials
|
||||
secret: hostconfig_operator_image_repo_credentials
|
||||
pass-to-parent: true
|
||||
vars:
|
||||
image: quay.io/airshipit/hostconfig-operator
|
||||
image_repo: quay.io
|
||||
|
||||
- job:
|
||||
name: airship-hostconfig-operator-upload-git-mirror
|
||||
|
@ -11,6 +11,15 @@
|
||||
# limitations under the License.
|
||||
|
||||
- project:
|
||||
vars:
|
||||
proxy:
|
||||
enabled: false
|
||||
http: ""
|
||||
https: ""
|
||||
noproxy: ""
|
||||
image_repo: quay.io
|
||||
docker_image_prefix: airshipit
|
||||
|
||||
check:
|
||||
jobs:
|
||||
- airship-hostconfig-operator-test
|
||||
|
Loading…
Reference in New Issue
Block a user