aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadosław Piliszek <radoslaw.piliszek@gmail.com>2019-06-27 17:58:13 +0200
committerRadosław Piliszek <radoslaw.piliszek@gmail.com>2019-07-01 17:00:53 +0000
commit20ab480ca541ad2c76d7bcdc57e0a076c7bf6df4 (patch)
tree5a7d3e64ebd82ad0a9a4f87a30a05e34a9eb3809
parent470108a1c095fc1c5a74f852a8ab57f1e0fa7dd1 (diff)
downloadkolla-ansible-20ab480ca541ad2c76d7bcdc57e0a076c7bf6df4.tar.gz
kolla-ansible-20ab480ca541ad2c76d7bcdc57e0a076c7bf6df4.zip
CI: Use template-overrides.j2 from kolla
Some kolla-ansible jobs failed due to using external mirrors instead of local ones. This was due to not using the template override provided by kolla. This patch fixes that. Depends-On: https://review.opendev.org/668226 Change-Id: I27f714fdf05e521aa8ce25c5683a452ceb35eeb8 Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
-rwxr-xr-xtests/check-config.sh3
-rw-r--r--tests/run.yml13
-rwxr-xr-xtools/setup_gate.sh1
3 files changed, 16 insertions, 1 deletions
diff --git a/tests/check-config.sh b/tests/check-config.sh
index 92d4f2c59..c8c172c7c 100755
--- a/tests/check-config.sh
+++ b/tests/check-config.sh
@@ -23,7 +23,8 @@ function check_config {
-not -name kolla-build.conf \
-not -name passwords.yml \
-not -name passwords.yml.old \
- -not -name sources.list)
+ -not -name sources.list \
+ -not -name template_overrides.j2)
do
mode=$(sudo stat -c %a $f)
owner=$(sudo stat -c %U:%G $f)
diff --git a/tests/run.yml b/tests/run.yml
index 9c9ea9cd6..235ab59a1 100644
--- a/tests/run.yml
+++ b/tests/run.yml
@@ -44,6 +44,12 @@
- item.branch == zuul.branch
with_items: "{{ zuul['items'] }}"
+ # NOTE(yoctozepto): required to template template_overrides.j2 for Zuul
+ - name: Include kolla Zuul vars if building new images
+ include_vars:
+ file: "{{ zuul.executor.work_root }}/src/opendev.org/openstack/kolla/tests/vars/zuul.yml"
+ when: need_build_image # only then kolla sources are available (and used)
+
# NOTE(mgoddard): This only affects the remote copy of the repo, not the
# one on the executor.
- name: checkout the previous kolla-ansible branch
@@ -62,6 +68,13 @@
mode: 0777
become: true
+ # NOTE(yoctozepto): required to customize kolla to use local mirrors
+ - name: Template template_overrides.j2
+ template:
+ src: "{{ zuul.executor.work_root }}/src/opendev.org/openstack/kolla/tests/templates/template_overrides.j2"
+ dest: /etc/kolla/template_overrides.j2
+ when: need_build_image # only then kolla sources are available (and used)
+
# Use the initial repo to generate config files. For upgrade jobs, this
# repo is only available on the remote node, so use the remote-template
# role.
diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh
index 0d0a53817..786256ee0 100755
--- a/tools/setup_gate.sh
+++ b/tools/setup_gate.sh
@@ -57,6 +57,7 @@ profile = gate
registry = 127.0.0.1:4000
push = true
logs_dir = /tmp/logs/build
+template_override = /etc/kolla/template_overrides.j2
[profiles]
gate = ${GATE_IMAGES}