Change branch calculation for tripleo jobs
In [1] we added temporary excludes with sed for rocky container build This changes release calculation for all jobs that use tripleo-repos role. First priority - release of periodic jobs, then goes branch override of branchless jobs and only then the default zuul.branch. [1] https://review.openstack.org/644932 Change-Id: I00125923c0dfbfb3b7ebfb09ee633268697ae40d
This commit is contained in:
parent
92b2ac6fdd
commit
63c8791d20
|
@ -5,9 +5,23 @@
|
|||
include_vars:
|
||||
file: "common.yaml"
|
||||
|
||||
- name: Set branch for building containers check jobs
|
||||
set_fact:
|
||||
ci_branch: "{{ zuul.branch | replace('stable/','') }}"
|
||||
when: zuul is defined
|
||||
|
||||
- name: Set branch for building containers branchless
|
||||
set_fact:
|
||||
ci_branch: "{{ branch_override | replace('stable/','') }}"
|
||||
when: branch_override is defined
|
||||
|
||||
- name: Set branch for building containers periodic
|
||||
set_fact:
|
||||
ci_branch: "{{ release }}"
|
||||
when: release is defined
|
||||
|
||||
- name: Set facts for kolla-build.conf
|
||||
set_fact:
|
||||
ci_branch: "{{ zuul.branch | default('master') | replace('stable/','') }}"
|
||||
push_registry: "{{ push_registry | default('127.0.0.1:8787') }}"
|
||||
push_containers: "{{ push_containers | default(false) | bool }}"
|
||||
|
||||
|
|
|
@ -2,16 +2,10 @@
|
|||
source {{ workspace }}/venv/bin/activate
|
||||
TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/tripleo-common"
|
||||
|
||||
{% if zuul.branch == 'stable/rocky' %}
|
||||
{% for item in exclude_containers['rocky'] %}
|
||||
sed -i "/{{ item }}/,+1 d" $TRIPLEO_COMMON_PATH/container-images/overcloud_containers.yaml
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
openstack overcloud container image build \
|
||||
--config-file $TRIPLEO_COMMON_PATH/container-images/overcloud_containers.yaml \
|
||||
--kolla-config-file {{ workspace }}/kolla-build.conf \
|
||||
{% if zuul.branch != 'stable/rocky' %}
|
||||
{% if ci_branch != 'rocky' %}
|
||||
{% for item in exclude_containers[ansible_pkg_mgr] %}
|
||||
--exclude {{ item }} \
|
||||
{% endfor %}
|
||||
|
|
|
@ -7,9 +7,5 @@ template_override={{ openstack_git_root }}/tripleo-common/container-images/tripl
|
|||
# we use the repos off the main host as they will already have the correct mirror info in them
|
||||
rpm_setup_config=http://172.17.0.1/delorean.repo,http://172.17.0.1/delorean-{{ ci_branch }}-testing.repo
|
||||
push={{ push_containers }}
|
||||
{% if 'periodic' in zuul.pipeline %}
|
||||
namespace=tripleo{{ release|default("master") }}
|
||||
{% else %}
|
||||
namespace={{ ci_branch | replace("/", "") }}
|
||||
{% endif %}
|
||||
namespace=tripleo{{ ci_branch }}
|
||||
debug=True
|
||||
|
|
|
@ -18,11 +18,21 @@
|
|||
virtualenv_python: "{{ virtualenv_python[ansible_pkg_mgr] }}"
|
||||
virtualenv_site_packages: true
|
||||
|
||||
- name: Get branch
|
||||
- name: Set branch for building containers check jobs
|
||||
set_fact:
|
||||
ci_branch: "{{ zuul.branch | default('master') | replace('stable/','') }}"
|
||||
ci_branch: "{{ zuul.branch | replace('stable/','') }}"
|
||||
when: zuul is defined
|
||||
|
||||
- name: Set branch for building containers branchless
|
||||
set_fact:
|
||||
ci_branch: "{{ branch_override | replace('stable/','') }}"
|
||||
when: branch_override is defined
|
||||
|
||||
- name: Set branch for building containers periodic
|
||||
set_fact:
|
||||
ci_branch: "{{ release }}"
|
||||
when: release is defined
|
||||
|
||||
- name: Install repos
|
||||
become: true
|
||||
shell: |
|
||||
|
|
Loading…
Reference in New Issue