Optimize image build/publish jobs
Zuul jobs are running out of space and failing. This attempts to resolve by cleaning up between the build/publish of each image. Switched to the ansible command module, since the make module doesn't support multiple make targets. Added a clean target to any image which didn't already have one, which was just the ipa-downloader-image. Signed-off-by: Sean Eagan <seaneagan1@gmail.com> Change-Id: I36747a7cd858eef612f654f50a5c65f596e4a59d
This commit is contained in:
parent
2453c913a3
commit
ec7e6f3fc9
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
TOPTGTS := images lint all docs run_images tests
|
||||
TOPTGTS := images lint all docs run_images tests clean
|
||||
IMAGES := $(wildcard */Makefile)
|
||||
|
||||
$(TOPTGTS): $(IMAGES)
|
||||
|
@ -90,4 +90,8 @@ images: build_ipa
|
||||
tests:
|
||||
echo TODO
|
||||
|
||||
.PHONY: images build_ipa tests
|
||||
clean:
|
||||
docker image rm $(IMAGE)
|
||||
# TODO: Clean up ipa builder container/image/artifacts
|
||||
|
||||
.PHONY: images build_ipa tests clean
|
||||
|
@ -38,21 +38,21 @@
|
||||
when: pre_build_role is defined
|
||||
- name: Publish images
|
||||
block:
|
||||
- make:
|
||||
- command: make images clean
|
||||
args:
|
||||
chdir: "{{ makefile_chdir }}"
|
||||
target: "images"
|
||||
params:
|
||||
AZ_SDK: "{{ az_sdk }}"
|
||||
COMMIT: "{{ zuul.newrev | default('') }}"
|
||||
DOCKER_REGISTRY: "{{ docker_registry }}"
|
||||
GCP_SDK: "{{ gcp_sdk }}"
|
||||
IMAGE_PREFIX: "{{ image_prefix | default('airshipit') }}"
|
||||
IMAGE_TAG: "{{ image_tag | default('latest') }}"
|
||||
LABEL: "{{ image_label | default('org.airshipit.build=community') }}"
|
||||
NO_PROXY: "{{ proxy.noproxy }}"
|
||||
PUSH_IMAGE: "false"
|
||||
PROXY: "{{ proxy.http }}"
|
||||
QCOW_CONF_DIRS: "{{ qcow_conf_dirs | default('') }}"
|
||||
USE_PROXY: "{{ proxy.enabled | lower }}"
|
||||
WORKDIR: "{{ image_config_dir | default('config') }}"
|
||||
environment:
|
||||
AZ_SDK: "{{ az_sdk }}"
|
||||
COMMIT: "{{ zuul.newrev | default('') }}"
|
||||
DOCKER_REGISTRY: "{{ docker_registry }}"
|
||||
GCP_SDK: "{{ gcp_sdk }}"
|
||||
IMAGE_PREFIX: "{{ image_prefix | default('airshipit') }}"
|
||||
IMAGE_TAG: "{{ image_tag | default('latest') }}"
|
||||
LABEL: "{{ image_label | default('org.airshipit.build=community') }}"
|
||||
NO_PROXY: "{{ proxy.noproxy }}"
|
||||
PUSH_IMAGE: "false"
|
||||
PROXY: "{{ proxy.http }}"
|
||||
QCOW_CONF_DIRS: "{{ qcow_conf_dirs | default('') }}"
|
||||
USE_PROXY: "{{ proxy.enabled | lower }}"
|
||||
WORKDIR: "{{ image_config_dir | default('config') }}"
|
||||
become: True
|
||||
|
@ -44,23 +44,23 @@
|
||||
password: "{{ airship_images_quay_creds.password }}"
|
||||
registry_url: "{{ docker_registry }}"
|
||||
- name: Push Images with Latest and Commit Tags
|
||||
make:
|
||||
command: make images clean
|
||||
args:
|
||||
chdir: "{{ makefile_chdir }}"
|
||||
target: "images"
|
||||
params:
|
||||
AZ_SDK: "{{ az_sdk }}"
|
||||
COMMIT: "{{ zuul.newrev | default('') }}"
|
||||
DOCKER_REGISTRY: "{{ docker_registry }}"
|
||||
GCP_SDK: "{{ gcp_sdk }}"
|
||||
IMAGE_PREFIX: "{{ image_prefix | default('airshipit') }}"
|
||||
IMAGE_TAG: "{{ item }}"
|
||||
LABEL: "{{ image_label | default('org.airshipit.build=community') }}"
|
||||
NO_PROXY: "{{ proxy.noproxy }}"
|
||||
PUSH_IMAGE: "true"
|
||||
PROXY: "{{ proxy.http }}"
|
||||
QCOW_CONF_DIRS: "{{ qcow_conf_dirs | default('') }}"
|
||||
USE_PROXY: "{{ proxy.enabled | lower }}"
|
||||
WORKDIR: "{{ image_config_dir | default('config') }}"
|
||||
environment:
|
||||
AZ_SDK: "{{ az_sdk }}"
|
||||
COMMIT: "{{ zuul.newrev | default('') }}"
|
||||
DOCKER_REGISTRY: "{{ docker_registry }}"
|
||||
GCP_SDK: "{{ gcp_sdk }}"
|
||||
IMAGE_PREFIX: "{{ image_prefix | default('airshipit') }}"
|
||||
IMAGE_TAG: "{{ item }}"
|
||||
LABEL: "{{ image_label | default('org.airshipit.build=community') }}"
|
||||
NO_PROXY: "{{ proxy.noproxy }}"
|
||||
PUSH_IMAGE: "true"
|
||||
PROXY: "{{ proxy.http }}"
|
||||
QCOW_CONF_DIRS: "{{ qcow_conf_dirs | default('') }}"
|
||||
USE_PROXY: "{{ proxy.enabled | lower }}"
|
||||
WORKDIR: "{{ image_config_dir | default('config') }}"
|
||||
with_items:
|
||||
- "{{ image_tag | default('latest') }}"
|
||||
- "{{ zuul.newrev }}"
|
||||
|
Loading…
Reference in New Issue
Block a user