Improve build images role for CentOS8
* Below is the list of improvements, it adds - replace rhel_image_source to tripleo_image_source by maintaining backward compatibility - Reset dib set_facts for RHEL and CentOS-8 - Run pathfix_repos.sh script only for few files - Set DIB_NAME and DIB_PYTHON_VERSION for centos-8 and RHEL-8 as the Image stills have python2 content or getting pulled by something else. - Added the centos jobs to respective places - Install pyyaml for centos-8 - Copy tripleo-centos-* repo when dib_yum_repo_conf is not defined Change-Id: Ibcf1cbb7e3fa669e926392f3dd2c122cabb889e9 Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
This commit is contained in:
parent
caa96846dd
commit
d485912d98
@ -17,7 +17,7 @@
|
|||||||
shell: bash build_images.sh > {{ workspace }}/logs/script_build.log 2> {{ workspace }}/logs/script_build-err.log
|
shell: bash build_images.sh > {{ workspace }}/logs/script_build.log 2> {{ workspace }}/logs/script_build-err.log
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
- when: rhel_image_source is defined
|
- when: tripleo_image_source is defined
|
||||||
block:
|
block:
|
||||||
- name: check if overcloud images were built
|
- name: check if overcloud images were built
|
||||||
stat:
|
stat:
|
||||||
|
@ -1,20 +1,43 @@
|
|||||||
---
|
---
|
||||||
- when: rhel_image_source is defined
|
# In order to make this role distro agnostic, it replaces
|
||||||
|
# rhel_image_source with tripleo_image_source, will be removed
|
||||||
|
# in future.
|
||||||
|
|
||||||
|
- name: Set tripleo_image_source
|
||||||
|
set_fact:
|
||||||
|
tripleo_image_source: "{{ rhel_image_source }}"
|
||||||
|
when:
|
||||||
|
- rhel_image_source is defined
|
||||||
|
- ansible_distribution == 'RedHat'
|
||||||
|
- ansible_distribution_major_version is version(8, '>=')
|
||||||
|
|
||||||
|
- when: tripleo_image_source is defined
|
||||||
block:
|
block:
|
||||||
- name: Set dib_local_image and other facts used by tripleo-ci build-image role build template
|
- name: Set dib related facts used by tripleo-ci build-image role build template
|
||||||
set_fact:
|
set_fact:
|
||||||
dib_local_image: "{{ workspace }}/{{ rhel_image_source | urlsplit('path') | basename }}"
|
dib_local_image: "{{ workspace }}/{{ tripleo_image_source | urlsplit('path') | basename }}"
|
||||||
dib_node_dist: "rhel"
|
dib_node_dist: >-
|
||||||
|
{% if ansible_distribution == 'RedHat' and ansible_distribution_major_version is version(8, '>=') -%}
|
||||||
|
"rhel"
|
||||||
|
{%- else -%}
|
||||||
|
"centos"
|
||||||
|
{%- endif %}
|
||||||
dib_release: "8"
|
dib_release: "8"
|
||||||
dib_yum_repo_conf: >-
|
dib_yum_repo_conf: >-
|
||||||
/etc/yum.repos.d/delorean.repo
|
/etc/yum.repos.d/delorean.repo
|
||||||
|
{% if ansible_distribution == 'RedHat' and ansible_distribution_major_version is version(8, '>=') -%}
|
||||||
/etc/yum.repos.d/delorean-rhel8-{{ release|default('master') }}-deps.repo
|
/etc/yum.repos.d/delorean-rhel8-{{ release|default('master') }}-deps.repo
|
||||||
/etc/yum.repos.d/rh-cloud.repo
|
/etc/yum.repos.d/rh-cloud.repo
|
||||||
|
{%- else -%}
|
||||||
|
/etc/yum.repos.d/delorean-{{ release|default('master') }}-testing.repo
|
||||||
|
/etc/yum.repos.d/tripleo-centos-powertools.repo
|
||||||
|
/etc/yum.repos.d/tripleo-centos-highavailability.repo
|
||||||
|
{%- endif %}
|
||||||
cacheable: true
|
cacheable: true
|
||||||
|
|
||||||
- name: Download rhel source image
|
- name: Download TripleO source image
|
||||||
get_url:
|
get_url:
|
||||||
url: "{{ rhel_image_source }}"
|
url: "{{ tripleo_image_source }}"
|
||||||
dest: "{{ dib_local_image }}"
|
dest: "{{ dib_local_image }}"
|
||||||
|
|
||||||
# get python_v fact used with vars/common.yaml to get
|
# get python_v fact used with vars/common.yaml to get
|
||||||
@ -22,7 +45,7 @@
|
|||||||
- name: Get python_v fact for py2 or py3 common vars
|
- name: Get python_v fact for py2 or py3 common vars
|
||||||
include_tasks: check_set_py3.yaml
|
include_tasks: check_set_py3.yaml
|
||||||
|
|
||||||
- name: Install pip and virtualenv
|
- name: Install pip pyyaml and virtualenv
|
||||||
become: true
|
become: true
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
@ -30,6 +53,7 @@
|
|||||||
loop:
|
loop:
|
||||||
- "{{ python_version[python_v] }}-pip"
|
- "{{ python_version[python_v] }}-pip"
|
||||||
- "{{ python_version[python_v] }}-virtualenv"
|
- "{{ python_version[python_v] }}-virtualenv"
|
||||||
|
- "{{ python_version[python_v] }}-pyyaml"
|
||||||
|
|
||||||
- when: python_v == "py3"
|
- when: python_v == "py3"
|
||||||
block:
|
block:
|
||||||
|
@ -26,7 +26,7 @@ fi
|
|||||||
|
|
||||||
{% if dib_local_image is defined %}
|
{% if dib_local_image is defined %}
|
||||||
|
|
||||||
# this is only set in rhel8 jobs dib_rhel_image -> DIB_LOCAL_IMAGE
|
# this is only set in rhel/centos-8 jobs dib_rhel_image -> DIB_LOCAL_IMAGE
|
||||||
export DIB_LOCAL_IMAGE={{ dib_local_image }}
|
export DIB_LOCAL_IMAGE={{ dib_local_image }}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -34,7 +34,8 @@ export DIB_LOCAL_IMAGE={{ dib_local_image }}
|
|||||||
{% if dib_node_dist is defined %}
|
{% if dib_node_dist is defined %}
|
||||||
|
|
||||||
export NODE_DIST={{ dib_node_dist }}
|
export NODE_DIST={{ dib_node_dist }}
|
||||||
|
export DISTRO_NAME={{ dib_node_dist }}
|
||||||
|
export DIB_PYTHON_VERSION=3
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if dib_release is defined %}
|
{% if dib_release is defined %}
|
||||||
@ -47,8 +48,11 @@ export DIB_RELEASE={{ dib_release }}
|
|||||||
|
|
||||||
export DIB_YUM_REPO_CONF='{{ dib_yum_repo_conf }}'
|
export DIB_YUM_REPO_CONF='{{ dib_yum_repo_conf }}'
|
||||||
|
|
||||||
{% else %}
|
{% elif ansible_distribution == 'CentOS' and ansible_distribution_major_version is version(8, '>=') %}
|
||||||
|
|
||||||
|
export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean* /etc/yum.repos.d/tripleo-centos*"
|
||||||
|
|
||||||
|
{% else %}
|
||||||
export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean*"
|
export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean*"
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -565,6 +565,8 @@
|
|||||||
post-run: playbooks/tripleo-buildimages/post.yaml
|
post-run: playbooks/tripleo-buildimages/post.yaml
|
||||||
timeout: 4200
|
timeout: 4200
|
||||||
nodeset: single-centos-8-node
|
nodeset: single-centos-8-node
|
||||||
|
vars:
|
||||||
|
tripleo_image_os: centos8
|
||||||
required-projects:
|
required-projects:
|
||||||
- opendev.org/openstack/diskimage-builder
|
- opendev.org/openstack/diskimage-builder
|
||||||
- opendev.org/openstack/heat-agents
|
- opendev.org/openstack/heat-agents
|
||||||
|
@ -7,17 +7,56 @@
|
|||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- tripleo-buildimage-overcloud-full-centos-7
|
- tripleo-buildimage-overcloud-full-centos-7
|
||||||
|
- tripleo-buildimage-overcloud-full-centos-8
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- tripleo-buildimage-overcloud-full-centos-7
|
- tripleo-buildimage-overcloud-full-centos-7
|
||||||
|
- tripleo-buildimage-overcloud-full-centos-8
|
||||||
experimental:
|
experimental:
|
||||||
jobs:
|
jobs:
|
||||||
- tripleo-buildimage-ironic-python-agent-centos-7
|
- tripleo-buildimage-ironic-python-agent-centos-7
|
||||||
- tripleo-buildimage-overcloud-hardened-full-centos-7
|
- tripleo-buildimage-overcloud-hardened-full-centos-7
|
||||||
|
- tripleo-buildimage-ironic-python-agent-centos-8
|
||||||
|
- tripleo-buildimage-overcloud-hardened-full-centos-8
|
||||||
|
|
||||||
|
# CentOS 8 Image Build Jobs
|
||||||
|
- job:
|
||||||
|
name: tripleo-buildimage-ironic-python-agent-centos-8
|
||||||
|
parent: tripleo-build-images-base-centos-8
|
||||||
|
branches: ^(?!stable/(newton|ocata|pike|queens|rocky|stein|train)).*$
|
||||||
|
vars:
|
||||||
|
tripleo_image_type: ironic-python-agent
|
||||||
|
voting: false
|
||||||
|
irrelevant-files:
|
||||||
|
- ^.*\.rst$
|
||||||
|
- ^releasenotes/.*$
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: tripleo-buildimage-overcloud-full-centos-8
|
||||||
|
parent: tripleo-build-images-base-centos-8
|
||||||
|
branches: ^(?!stable/(newton|ocata|pike|queens|rocky|stein|train)).*$
|
||||||
|
vars:
|
||||||
|
tripleo_image_type: overcloud-full
|
||||||
|
irrelevant-files:
|
||||||
|
- ^.*\.rst$
|
||||||
|
- ^releasenotes/.*$
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: tripleo-buildimage-overcloud-hardened-full-centos-8
|
||||||
|
parent: tripleo-build-images-base-centos-8
|
||||||
|
branches: ^(?!stable/(newton|ocata|pike|queens|rocky|stein|train)).*$
|
||||||
|
vars:
|
||||||
|
tripleo_image_type: overcloud-hardened-full
|
||||||
|
voting: false
|
||||||
|
irrelevant-files:
|
||||||
|
- ^.*\.rst$
|
||||||
|
- ^releasenotes/.*$
|
||||||
|
|
||||||
|
# CentOS 7 Image Build Jobs
|
||||||
- job:
|
- job:
|
||||||
name: tripleo-buildimage-ironic-python-agent-centos-7
|
name: tripleo-buildimage-ironic-python-agent-centos-7
|
||||||
parent: tripleo-build-images-base
|
parent: tripleo-build-images-base
|
||||||
|
branches: ^(stable/(pike|queens|rocky|stein|train)).*$
|
||||||
vars:
|
vars:
|
||||||
tripleo_image_type: ironic-python-agent
|
tripleo_image_type: ironic-python-agent
|
||||||
tripleo_image_os: centos7
|
tripleo_image_os: centos7
|
||||||
@ -29,6 +68,7 @@
|
|||||||
- job:
|
- job:
|
||||||
name: tripleo-buildimage-overcloud-full-centos-7
|
name: tripleo-buildimage-overcloud-full-centos-7
|
||||||
parent: tripleo-build-images-base
|
parent: tripleo-build-images-base
|
||||||
|
branches: ^(stable/(pike|queens|rocky|stein|train)).*$
|
||||||
vars:
|
vars:
|
||||||
tripleo_image_type: overcloud-full
|
tripleo_image_type: overcloud-full
|
||||||
tripleo_image_os: centos7
|
tripleo_image_os: centos7
|
||||||
@ -39,6 +79,7 @@
|
|||||||
- job:
|
- job:
|
||||||
name: tripleo-buildimage-overcloud-hardened-full-centos-7
|
name: tripleo-buildimage-overcloud-hardened-full-centos-7
|
||||||
parent: tripleo-build-images-base
|
parent: tripleo-build-images-base
|
||||||
|
branches: ^(stable/(pike|queens|rocky|stein|train)).*$
|
||||||
vars:
|
vars:
|
||||||
tripleo_image_type: overcloud-hardened-full
|
tripleo_image_type: overcloud-hardened-full
|
||||||
tripleo_image_os: centos7
|
tripleo_image_os: centos7
|
||||||
|
@ -28,10 +28,16 @@
|
|||||||
- ^setup.cfg$
|
- ^setup.cfg$
|
||||||
- ^setup.py$
|
- ^setup.py$
|
||||||
- ^tox.ini$
|
- ^tox.ini$
|
||||||
- tripleo-buildimage-overcloud-full-centos-7:
|
- tripleo-buildimage-overcloud-full-centos-8:
|
||||||
files: &build_images_files
|
files: &build_images_files
|
||||||
- ^playbooks/tripleo-buildimages/.*$
|
- ^playbooks/tripleo-buildimages/.*$
|
||||||
- ^roles/oooci-build-images/.*$
|
- ^roles/oooci-build-images/.*$
|
||||||
|
- tripleo-buildimage-ironic-python-agent-centos-8:
|
||||||
|
files: *build_images_files
|
||||||
|
- tripleo-buildimage-overcloud-hardened-full-centos-8:
|
||||||
|
files: *build_images_files
|
||||||
|
- tripleo-buildimage-overcloud-full-centos-7:
|
||||||
|
files: *build_images_files
|
||||||
- tripleo-buildimage-ironic-python-agent-centos-7:
|
- tripleo-buildimage-ironic-python-agent-centos-7:
|
||||||
files: *build_images_files
|
files: *build_images_files
|
||||||
- tripleo-buildimage-overcloud-hardened-full-centos-7:
|
- tripleo-buildimage-overcloud-hardened-full-centos-7:
|
||||||
@ -67,6 +73,8 @@
|
|||||||
files: *py_files
|
files: *py_files
|
||||||
- tripleo-buildimage-overcloud-full-centos-7:
|
- tripleo-buildimage-overcloud-full-centos-7:
|
||||||
files: *build_images_files
|
files: *build_images_files
|
||||||
|
- tripleo-buildimage-overcloud-full-centos-8:
|
||||||
|
files: *build_images_files
|
||||||
- tripleo-ci-centos-7-standalone-upgrade-train:
|
- tripleo-ci-centos-7-standalone-upgrade-train:
|
||||||
branches: master
|
branches: master
|
||||||
- tripleo-ci-centos-7-standalone-upgrade-stein:
|
- tripleo-ci-centos-7-standalone-upgrade-stein:
|
||||||
|
Loading…
Reference in New Issue
Block a user