aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRadosław Piliszek <radoslaw.piliszek@gmail.com>2021-03-17 17:05:22 +0000
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2021-04-06 11:00:53 +0000
commit10d8f03c4e6fe2e78f06e9c59f44210c8c2e73eb (patch)
tree25f3a34831abb1deb44ce60ccd224fe426ae07a4 /tests
parentac4e496eeb93943c52a64c110a52d433378aa88b (diff)
downloadkolla-10d8f03c4e6fe2e78f06e9c59f44210c8c2e73eb.tar.gz
kolla-10d8f03c4e6fe2e78f06e9c59f44210c8c2e73eb.zip
[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
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 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) }}"