aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-04-08 13:59:51 +0000
committerGerrit Code Review <review@openstack.org>2021-04-08 13:59:51 +0000
commitd50832066d090ff672b54e4170a56f5584d31c14 (patch)
tree8fe613066b02974f81ab33ed2f36b39bbeee9f66 /tests
parentab8ee75bda2df6a54bab63d90dd0a6542085704f (diff)
parent10d8f03c4e6fe2e78f06e9c59f44210c8c2e73eb (diff)
downloadkolla-d50832066d090ff672b54e4170a56f5584d31c14.tar.gz
kolla-d50832066d090ff672b54e4170a56f5584d31c14.zip
Merge "[CI] Publish images to quay.io on a daily basis"
Diffstat (limited to 'tests')
-rw-r--r--tests/playbooks/publish.yml38
-rw-r--r--tests/playbooks/run.yml2
2 files changed, 29 insertions, 11 deletions
diff --git a/tests/playbooks/publish.yml b/tests/playbooks/publish.yml
index 1149408fe..6c688b664 100644
--- a/tests/playbooks/publish.yml
+++ b/tests/playbooks/publish.yml
@@ -11,16 +11,34 @@
docker_host_info:
images: yes
images_filters:
- reference: "kolla/*"
+ reference: "{{ kolla_namespace }}/*"
register: docker_host_info
- - name: Login to Dockerhub
- docker_login:
- username: "{{ kolla_dockerhub_creds.user | trim }}"
- password: "{{ kolla_dockerhub_creds.password | trim }}"
+ - block:
+ - name: Login to Dockerhub
+ docker_login:
+ username: "{{ kolla_dockerhub_creds.user | trim }}"
+ password: "{{ kolla_dockerhub_creds.password | trim }}"
- - name: Push built container images
- docker_image:
- name: "{{ item.RepoTags.0 }}"
- push: yes
- loop: "{{ docker_host_info.images }}"
+ - name: Push built container images
+ docker_image:
+ name: "{{ item.RepoTags.0 }}"
+ push: yes
+ loop: "{{ docker_host_info.images }}"
+ when: kolla_registry == 'dockerhub'
+
+ - block:
+ - name: Login to quay.io
+ docker_login:
+ registry: quay.io
+ username: "{{ kolla_quay_io_creds.username | trim }}"
+ password: "{{ kolla_quay_io_creds.password | trim }}"
+
+ - name: Push built container images
+ docker_image:
+ name: "{{ item.RepoTags.0 }}"
+ push: yes
+ repository: "quay.io/{{ item.RepoTags.0 }}"
+ source: local
+ loop: "{{ docker_host_info.images }}"
+ when: kolla_registry == 'quay.io'
diff --git a/tests/playbooks/run.yml b/tests/playbooks/run.yml
index 3407aa6e8..092464c0f 100644
--- a/tests/playbooks/run.yml
+++ b/tests/playbooks/run.yml
@@ -31,7 +31,7 @@
vars:
kolla_publisher_config:
DEFAULT:
- namespace: kolla
+ namespace: "{{ kolla_namespace }}"
tag: "{{ (zuul.tag if zuul.pipeline == 'release' else zuul.branch | basename) ~ tag_suffix }}"
set_fact:
kolla_build_config: "{{ kolla_build_config | combine(kolla_publisher_config, recursive=True) }}"