From 10d8f03c4e6fe2e78f06e9c59f44210c8c2e73eb Mon Sep 17 00:00:00 2001 From: Radosław Piliszek Date: Wed, 17 Mar 2021 17:05:22 +0000 Subject: [CI] Publish images to quay.io on a daily basis Based on the discussions from the past 3 Kolla meetings [1][2][3], we established that, to avoid the DockerHub pull limit issues in our CI, we will try using quay.io. We still publish weekly to the DockerHub. [1] http://eavesdrop.openstack.org/meetings/kolla/2021/kolla.2021-03-17-15.00.log.html#l-102 [2] http://eavesdrop.openstack.org/meetings/kolla/2021/kolla.2021-03-24-15.00.log.html#l-137 [3] http://eavesdrop.openstack.org/meetings/kolla/2021/kolla.2021-03-31-15.01.log.html#l-50 Change-Id: I7c1f0c5fc643678b29f963b6769d8f900a03b726 Depends-On: Id113a53c083d105ac9200474ff20faacef6decaf --- tests/playbooks/publish.yml | 38 ++++++++++++++++++++++++++++---------- tests/playbooks/run.yml | 2 +- 2 files changed, 29 insertions(+), 11 deletions(-) (limited to 'tests') 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 e71b7b17d..66b8383bc 100644 --- a/tests/playbooks/run.yml +++ b/tests/playbooks/run.yml @@ -27,7 +27,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) }}" -- cgit v1.2.3