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