Fix image publish job

This commit fixes image publish job for hostconfig-operator.

Signed-off-by: Sreejith Punnapuzha <Sreejith.Punnapuzha@outlook.com>
Change-Id: I49c5a44ef3743368da0b4edaa405593145364fad
This commit is contained in:
Sreejith Punnapuzha 2021-01-08 11:59:28 -06:00
parent 745e834a1e
commit 39758178e5
3 changed files with 14 additions and 4 deletions

View File

@ -8,7 +8,7 @@ DOCKER_REGISTRY ?= quay.io
DOCKER_FORCE_CLEAN ?= true
DOCKER_IMAGE_NAME ?= hostconfig-operator
DOCKER_IMAGE_PREFIX ?= airshipit
DOCKER_IMAGE_TAG ?= dev
DOCKER_IMAGE_TAG ?= latest
DOCKER_IMAGE ?= $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_PREFIX)/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
# proxy options
@ -16,6 +16,9 @@ PROXY ?= http://proxy.foo.com:8000
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
USE_PROXY ?= false
# docker image publish
PUBLISH ?= false
# Build hostconfig-operator image
.PHONY: images
images:
@ -35,7 +38,7 @@ endif
# Publishing hostconfig-operator image to quay.io
ifeq ($(PUBLISH), true)
@echo 'publish hostconfig image to quay.io with image name $(DOCKER_IMAGE)'
@docker push $(DOCKER_IMAGE)
@docker push $(DOCKER_IMAGE)
endif
# Priniting docker image tag

View File

@ -33,6 +33,7 @@
chdir: "{{ zuul.project.src_dir }}"
params:
DOCKER_IMAGE_TAG: latest
DOCKER_REGISTRY: "{{ image_repo }}"
PUBLISH: "true"
target: images
@ -41,5 +42,6 @@
chdir: "{{ zuul.project.src_dir }}"
params:
DOCKER_IMAGE_TAG: "{{ zuul.newrev }}"
DOCKER_REGISTRY: "{{ image_repo }}"
PUBLISH: "true"
target: images

View File

@ -16,7 +16,8 @@
pre-run: playbooks/airship-hostconfig-operator-deploy-docker.yaml
timeout: 3600
run: playbooks/airship-hostconfig-operator.yaml
post-run: playbooks/airship-collect-logs.yaml
post-run:
- playbooks/airship-collect-logs.yaml
attempts: 1
vars:
gate_scripts:
@ -35,6 +36,8 @@
name: airship-hostconfig-operator-build-image
nodeset: airship-hostconfig-single-node
run: playbooks/airship-hostconfig-operator-build-images.yaml
post-run:
- playbooks/airship-collect-logs.yaml
irrelevant-files:
- ^.*\.md$
- ^docs/.*$
@ -42,7 +45,9 @@
- job:
name: airship-hostconfig-operator-publish-image
parent: airship-hostconfig-operator-build-image
post-run: playbooks/airship-hostconfig-operator-publish-images.yaml
post-run:
- playbooks/airship-collect-logs.yaml
- playbooks/airship-hostconfig-operator-publish-images.yaml
secrets:
- name: hostconfig_operator_image_repo_credentials
secret: hostconfig_operator_image_repo_credentials