aboutsummaryrefslogtreecommitdiff
path: root/tests/templates
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2017-11-07 07:39:53 +0000
committerGerrit Code Review <review@openstack.org>2017-11-07 07:39:53 +0000
commit61495b1a8303e52f58cc4d8970c2d484b5f31520 (patch)
tree85a4cb4fe9133f2a100179f840a6fbe993cbee3b /tests/templates
parentf4731f7a6da5031b8acc2c260427a3ee376cc3b3 (diff)
parentc506e626e7443fb95180807013082fb281390376 (diff)
downloadkolla-61495b1a8303e52f58cc4d8970c2d484b5f31520.tar.gz
kolla-61495b1a8303e52f58cc4d8970c2d484b5f31520.zip
Merge "Dockerhub publisher job"
Diffstat (limited to 'tests/templates')
-rw-r--r--tests/templates/kolla-build.conf.j212
-rw-r--r--tests/templates/pip.conf.j24
-rw-r--r--tests/templates/template_overrides.j256
3 files changed, 72 insertions, 0 deletions
diff --git a/tests/templates/kolla-build.conf.j2 b/tests/templates/kolla-build.conf.j2
new file mode 100644
index 000000000..3b1ea1051
--- /dev/null
+++ b/tests/templates/kolla-build.conf.j2
@@ -0,0 +1,12 @@
+[DEFAULT]
+debug = true
+{% if publisher %}
+profile = default
+profile = infra
+profile = main
+namespace = kolla
+tag = queens
+{% endif %}
+push = false
+logs_dir = /tmp/logs/build
+template_override = /etc/kolla/template_overrides.j2
diff --git a/tests/templates/pip.conf.j2 b/tests/templates/pip.conf.j2
new file mode 100644
index 000000000..8f0ac66ad
--- /dev/null
+++ b/tests/templates/pip.conf.j2
@@ -0,0 +1,4 @@
+[global]
+timeout = 60
+index-url = {{ nodepool_pypi_mirror }}
+trusted-host = {{ nodepool_mirror_host }}
diff --git a/tests/templates/template_overrides.j2 b/tests/templates/template_overrides.j2
new file mode 100644
index 000000000..fda0420d5
--- /dev/null
+++ b/tests/templates/template_overrides.j2
@@ -0,0 +1,56 @@
+{% raw %}
+{% extends parent_template %}
+
+{% block base_header %}
+{% endraw %}
+
+RUN echo $(base64 -w0 "{{ pip_conf }}") | base64 -d > /etc/pip.conf
+
+{% raw %}
+{% if base_distro == 'ubuntu' %}
+
+RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-unauthenticated
+
+{% endif %}
+{% endblock %}
+
+{% block base_footer %}
+{% if base_distro == "centos" %}
+{% endraw %}
+
+RUN sed -i -e "/^mirrorlist/d" \
+ -e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
+ /etc/yum.repos.d/CentOS-Base.repo \
+ && sed -i -e "/^mirrorlist/d" \
+ -e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
+ /etc/yum.repos.d/epel.repo \
+ && sed -i -e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
+ /etc/yum.repos.d/CentOS-Ceph-Jewel.repo \
+ && sed -i -e "s|^baseurl=https://trunk.rdoproject.org|baseurl=http://{{ nodepool_rdo_proxy }}|" \
+ /etc/yum.repos.d/delorean.repo
+
+{% raw %}
+{% elif base_distro == "oraclelinux" %}
+{% endraw %}
+
+RUN sed -i -e "/^mirrorlist/d" \
+ -e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
+ /etc/yum.repos.d/epel.repo \
+ && sed -i -e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
+ /etc/yum.repos.d/CentOS-Ceph-Jewel.repo \
+ && sed -i -e "s|^baseurl=https://trunk.rdoproject.org|baseurl=http://{{ nodepool_rdo_proxy }}|" \
+ /etc/yum.repos.d/delorean.repo
+
+{% raw %}
+{% elif base_distro == "ubuntu" %}
+{% endraw %}
+
+RUN sed -i -e "s|http://archive.ubuntu.com|http://{{ nodepool_mirror_host }}|" \
+ -e "s|http://ubuntu-cloud.archive.canonical.com/ubuntu|http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive|" \
+ /etc/apt/sources.list \
+ && apt-get update
+
+{% raw %}
+{% endif %}
+{% endblock %}
+{% endraw %}