Replace the auto-converted legacy jobs with native jobs and define all the jobs in-tree. After we merge this we can remove the legacy-manila-publish-generic job from the openstack-zuul-jobs repository. Note that the old job apparently relied on some JJB magic to construct tagged-image names. This no longer works so instead we use 'git describe --tags' to obtain a current tag, publish the image with its tagged name, and symlink manila-service-image-master.qcow2 -- which is the expected image-name for our CI jobs -- to it. Unfortunately the new publish job can't be tested beforehand so we may have to follow this with another patch if there are issues. Closes-Bug: #1812478 Change-Id: Ie0c367591c0e1ae4fefb62688ecd76aff5b94464
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- name: Run tools/gate/build-images generic
|
|
command: bash -xe tools/gate/build-images generic
|
|
args:
|
|
chdir: '{{ zuul.project.src_dir }}'
|
|
- name: create images directory
|
|
file:
|
|
path: '{{ zuul.project.src_dir }}/images'
|
|
state: directory
|
|
mode: 0755
|
|
- name: Collect git tag
|
|
command: git describe --tags
|
|
args:
|
|
chdir: '{{ zuul.project.src_dir }}'
|
|
register: tagoutput
|
|
- name: show directory contents after the build
|
|
command: ls -lrt
|
|
args:
|
|
chdir: '{{ zuul.project.src_dir }}'
|
|
- name: get the source directory
|
|
command: pwd
|
|
args:
|
|
chdir: '{{ zuul.project.src_dir }}'
|
|
register: src_dir
|
|
- name: hard link to image from images directory using tag
|
|
file:
|
|
src: '{{ src_dir.stdout }}/manila-service-image.qcow2'
|
|
dest: '{{ src_dir.stdout }}/images/manila-service-image-{{ tagoutput.stdout }}.qcow2'
|
|
state: hard
|
|
- name: now symlink using "master" in place of tag
|
|
file:
|
|
src: '{{ src_dir.stdout }}/images/manila-service-image-{{ tagoutput.stdout }}.qcow2'
|
|
dest: '{{ src_dir.stdout }}/images/manila-service-image-master.qcow2'
|
|
state: link
|
|
- name: show contents of the image directory
|
|
command: ls -lrt
|
|
args:
|
|
chdir: '{{ src_dir.stdout }}/images'
|