156e2bb389
This change duplicates the tripleo-buildimage-overcloud-hardened-full-centos-8* jobs to add tripleo-buildimage-overcloud-hardened-uefi-full-centos-8* jobs for master and wallaby. The overcloud-hardened-full and overcloud-hardened-uefi-full images are identical except that overcloud-hardened-uefi-full with boot on both legacy BIOS and UEFI systems (overcloud-hardened-full will only boot on legacy BIOS). As such there will be a follow-up change to remove the tripleo-buildimage-overcloud-hardened-full-centos-8 from running on master and wallaby. Change-Id: I92170acf42b9c1850acc060653629cef15b116bf Blueprint: whole-disk-default Depends-On: Id5c8ba02762ab87fab5f8121dda37b463466c050
79 lines
2.3 KiB
Django/Jinja
79 lines
2.3 KiB
Django/Jinja
set -ex
|
|
|
|
# Activate virtualenv only if exists
|
|
if [ -d "{{ workspace }}/venv" ]; then
|
|
source {{ workspace }}/venv/bin/activate
|
|
fi
|
|
|
|
# When python-tripleoclient is installed via packages
|
|
# elements_path are automatically setted.
|
|
|
|
{% if to_build is not defined %}
|
|
ELEMENTS="{{ tripleo_elements_path | join(':') }}"
|
|
|
|
if [ -d "{{ openstack_git_root }}/instack-undercloud/elements" ]; then
|
|
ELEMENTS="{{ openstack_git_root }}/instack-undercloud/elements:${ELEMENTS}"
|
|
fi
|
|
|
|
export ELEMENTS_PATH=$ELEMENTS
|
|
|
|
{% endif %}
|
|
|
|
# the tripleo_image_type is set and passed from the ci job definition
|
|
if [ "{{ tripleo_image_type }}" == "overcloud-hardened-uefi-full" ]; then
|
|
CONFIG_FILES="--config-file \
|
|
{{ tripleo_common_path }}/image-yaml/overcloud-hardened-images-uefi-python3.yaml \
|
|
--config-file {{ tripleo_common_path }}/image-yaml/overcloud-hardened-images-uefi-{{ tripleo_image_os }}.yaml"
|
|
elif [ "{{ tripleo_image_type }}" == "overcloud-hardened-full" ]; then
|
|
CONFIG_FILES="--config-file \
|
|
{{ tripleo_common_path }}/image-yaml/{{ hardened_image_config[python_v] }} \
|
|
--config-file {{ tripleo_common_path }}/image-yaml/overcloud-hardened-images-{{ tripleo_image_os }}.yaml"
|
|
else
|
|
CONFIG_FILES="--config-file \
|
|
{{ tripleo_common_path }}/image-yaml/{{ base_image_config[python_v] }} \
|
|
--config-file {{ tripleo_common_path }}/image-yaml/overcloud-images-{{ tripleo_image_os }}.yaml"
|
|
fi
|
|
|
|
{% if dib_local_image is defined %}
|
|
|
|
# this is only set in rhel/centos-8 jobs dib_rhel_image -> DIB_LOCAL_IMAGE
|
|
export DIB_LOCAL_IMAGE={{ dib_local_image }}
|
|
|
|
{% endif %}
|
|
|
|
{% if dib_node_dist is defined %}
|
|
|
|
export NODE_DIST={{ dib_node_dist }}
|
|
export DISTRO_NAME={{ dib_node_dist }}
|
|
{% endif %}
|
|
|
|
{% if dib_release is defined %}
|
|
|
|
export DIB_RELEASE={{ dib_release }}
|
|
|
|
{% endif %}
|
|
|
|
{% if dib_yum_repo_conf is defined %}
|
|
|
|
export DIB_YUM_REPO_CONF='{{ dib_yum_repo_conf | join(" ") }}'
|
|
|
|
{% else %}
|
|
|
|
export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean*"
|
|
|
|
{% endif %}
|
|
|
|
{% if dib_dnf_module_streams is defined and dib_dnf_module_streams|length > 0 %}
|
|
|
|
export DIB_DNF_MODULE_STREAMS='{{ dib_dnf_module_streams }}'
|
|
|
|
{% endif %}
|
|
|
|
export DIB_DEBUG_TRACE=1
|
|
|
|
openstack --debug overcloud image build {% if not build_all_images|bool %}--image-name {{ tripleo_image_type }}{% endif %} \
|
|
$CONFIG_FILES > {{ workspace }}/build.log 2> {{ workspace }}/build-err.log
|
|
RESULT=$?
|
|
|
|
exit $RESULT
|