Merge "Move buildimages playbook tasks from config to tripleo"

This commit is contained in:
Zuul 2019-08-08 19:21:45 +00:00 committed by Gerrit Code Review
commit 38e64b3096
2 changed files with 64 additions and 0 deletions

View File

@ -20,3 +20,52 @@
chdir: '{{ workspace }}'
shell: bash build_images.sh > {{ workspace }}/logs/script_build.log 2> {{ workspace }}/logs/script_build-err.log
changed_when: true
- when: rhel_image_source is defined
block:
- name: check if overcloud images were built
stat:
path: "{{ workspace }}/overcloud-full.qcow2"
register: overcloud_stat_result
- name: check if ipa images were built
stat:
path: "{{ workspace }}/ironic-python-agent.kernel"
register: ipa_stat_result
- when: ipa_stat_result.stat.exists|bool
block:
- name: ironic-python-agent
archive:
path:
- "{{ workspace }}/ironic-python-agent.initramfs"
- "{{ workspace }}/ironic-python-agent.kernel"
dest: "{{ ansible_user_dir }}/ironic-python-agent.tar"
format: tar
- name: Create md5sums
shell:
cmd: |
md5sum ironic-python-agent.tar > ironic-python-agent.tar.md5
args:
chdir: "{{ ansible_user_dir }}"
- when: overcloud_stat_result.stat.exists|bool
block:
- name: overcloud-full
archive:
path:
- "{{ workspace }}/overcloud-full.qcow2"
- "{{ workspace }}/overcloud-full.initrd"
- "{{ workspace }}/overcloud-full.vmlinuz"
dest: "{{ ansible_user_dir }}/overcloud-full.tar"
format: tar
- name: Create md5sums
shell:
cmd: |
md5sum overcloud-full.tar > overcloud-full.tar.md5
args:
chdir: "{{ ansible_user_dir }}"

View File

@ -3,6 +3,21 @@
include_vars:
file: "common.yaml"
- when: rhel_image_source is defined
block:
- name: Set dib_local_image and other facts used by tripleo-ci build-image role build template
set_fact:
dib_local_image: "{{ workspace }}/{{ rhel_image_source | urlsplit('path') | basename }}"
dib_node_dist: "rhel"
dib_release: "8"
dib_yum_repo_conf: " /etc/yum.repos.d/delorean.repo /etc/yum.repos.d/osp15-deps.repo /etc/yum.repos.d/rh-cloud.repo "
cacheable: true
- name: Download rhel source image
get_url:
url: "{{ rhel_image_source }}"
dest: "{{ dib_local_image }}"
# get python_v fact used with vars/common.yaml to get
# python2 or python3 packages in below tasks
- name: Get python_v fact for py2 or py3 common vars