diff --git a/playbooks/tripleo-buildcontainers/defaults/main.yaml b/playbooks/tripleo-buildcontainers/defaults/main.yaml index f649d3f76..3eeb01fd5 100644 --- a/playbooks/tripleo-buildcontainers/defaults/main.yaml +++ b/playbooks/tripleo-buildcontainers/defaults/main.yaml @@ -2,3 +2,4 @@ push_registry: "127.0.0.1:8787" push_tag: "latest" push_containers: "false" use_buildah: false +buildcontainers_override_repos: "" diff --git a/playbooks/tripleo-buildcontainers/post.yaml b/playbooks/tripleo-buildcontainers/post.yaml index 4b14d5b9e..9b283fe30 100644 --- a/playbooks/tripleo-buildcontainers/post.yaml +++ b/playbooks/tripleo-buildcontainers/post.yaml @@ -21,6 +21,7 @@ rsync -var --no-links /var/log/ {{ workspace }}/logs/system/ || true rsync -var --no-links /etc/docker/ {{ workspace }}/etc/docker/ || true rsync -var --no-links /etc/containers/ {{ workspace }}/etc/containers/ || true + rsync -var --no-links /etc/yum.repos.d/ {{ workspace }}/etc/yum.repos.d/ || true gzip -r "{{ workspace }}/logs" "{{ workspace }}/conf" "{{ workspace }}/etc" chmod -R a+r "{{ workspace }}" chown -R {{ ansible_user }}: "{{ workspace }}" diff --git a/playbooks/tripleo-buildcontainers/pre.yaml b/playbooks/tripleo-buildcontainers/pre.yaml index 41c9fc958..132b6945d 100644 --- a/playbooks/tripleo-buildcontainers/pre.yaml +++ b/playbooks/tripleo-buildcontainers/pre.yaml @@ -3,6 +3,7 @@ roles: - role: tripleo-repos tripleo_repos_repository: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/tripleo-repos'].src_dir }}" + override_repos: "{{ buildcontainers_override_repos | default('') }}" tasks: - name: Include common vars include_vars: diff --git a/roles/tripleo-repos/defaults/main.yml b/roles/tripleo-repos/defaults/main.yml index 0d3efc887..834d0c1a8 100644 --- a/roles/tripleo-repos/defaults/main.yml +++ b/roles/tripleo-repos/defaults/main.yml @@ -4,3 +4,5 @@ tripleo_repos_repository: "git+https://git.openstack.org/openstack/tripleo-repos workspace: "{{ ansible_user_dir }}" centos_mirror_host: "http://mirror.centos.org" rdo_mirror_host: "https://trunk.rdoproject.org" +override_repos: "" + diff --git a/roles/tripleo-repos/tasks/main.yml b/roles/tripleo-repos/tasks/main.yml index 264787566..1fb488f49 100644 --- a/roles/tripleo-repos/tasks/main.yml +++ b/roles/tripleo-repos/tasks/main.yml @@ -34,10 +34,12 @@ CENTOS_MIRROR_HOST=${CENTOS_MIRROR_HOST:-"{{ centos_mirror_host }}"} RDO_MIRROR_HOST=${NODEPOOL_RDO_PROXY:-"{{ rdo_mirror_host }}"} - if [ "{{ ci_branch | default('master') }}" == "master" ]; then - REPO=current-tripleo + if [ "{{ override_repos }}" != "" ]; then + REPO="{{ override_repos }}" + elif [ "{{ ci_branch | default('master') }}" == "master" ]; then + REPO=current-tripleo else - REPO=current + REPO=current fi tripleo-repos -b "{{ ci_branch | default('master') }}" \