Move buildimages playbook tasks from config to tripleo

Tasks that are in config/ repo don't have any secrets and should
be in tripleoc-ci, because they should be used in check jobs too.
RHEL-8 jobs fail because of lack of these tasks.

Change-Id: I0799fd3f6e89ac408d2987477f52f1952bc96686
This commit is contained in:
Sagi Shnaidman 2019-08-08 02:12:32 +03:00
parent 5a902b351f
commit f30dce2993
2 changed files with 64 additions and 0 deletions

View File

@ -20,3 +20,52 @@
chdir: '{{ workspace }}' chdir: '{{ workspace }}'
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
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: include_vars:
file: "common.yaml" 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 # get python_v fact used with vars/common.yaml to get
# python2 or python3 packages in below tasks # python2 or python3 packages in below tasks
- name: Get python_v fact for py2 or py3 common vars - name: Get python_v fact for py2 or py3 common vars