Fix the buildimages jobs: call the ensure-tox role
... and use its output. tox is not available by default on the images anymore. Conflicts: roles/build-sahara-images-dib/defaults/main.yaml roles/build-sahara-images-dib/tasks/main.yaml tools/gate/build-images The backport required some fixes due to the more simplified structure of the build images role and script in the older releases. Change-Id: If5ea0ffdfc51860842c19f0a6f238127d42eb292 (cherry picked from commit2d0c3a8b98
) (cherry picked from commit0a9a43cb76
) (cherry picked from commitcdf83a23a0
) (cherry picked from commit96abd08c28
)
This commit is contained in:
parent
e3246b4885
commit
11e4ab2583
|
@ -1,3 +1,4 @@
|
||||||
- hosts: all
|
- hosts: all
|
||||||
roles:
|
roles:
|
||||||
|
- ensure-tox
|
||||||
- build-sahara-images-dib
|
- build-sahara-images-dib
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
sahara_image_elements_src_dir: "{{ zuul.projects['opendev.org/openstack/sahara-image-elements'].src_dir }}"
|
sahara_image_elements_src_dir: "{{ zuul.projects['opendev.org/openstack/sahara-image-elements'].src_dir }}"
|
||||||
sahara_build_directory: /var/tmp/sahara-image-build
|
sahara_build_directory: /var/tmp/sahara-image-build
|
||||||
sahara_plugin: vanilla
|
sahara_plugin: vanilla
|
||||||
|
tox_executable: 'tox'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- name: Build all the images for the selected plugin
|
- name: Build all the images for the selected plugin
|
||||||
command: ./tools/gate/build-images "{{ sahara_plugin }}"
|
command: ./tools/gate/build-images "{{ sahara_plugin }}" "{{ tox_executable }}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ sahara_image_elements_src_dir }}"
|
chdir: "{{ sahara_image_elements_src_dir }}"
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash -xe
|
#!/bin/bash -xe
|
||||||
|
|
||||||
PLUGIN=$1
|
PLUGIN=$1
|
||||||
|
TOX_EXECUTABLE=${2:-'tox'}
|
||||||
|
|
||||||
export DIB_MIN_TMPFS=10
|
export DIB_MIN_TMPFS=10
|
||||||
case "$PLUGIN" in
|
case "$PLUGIN" in
|
||||||
"vanilla")
|
"vanilla")
|
||||||
|
@ -8,7 +10,7 @@ case "$PLUGIN" in
|
||||||
for distro in ubuntu centos7; do
|
for distro in ubuntu centos7; do
|
||||||
# limit to 2 releases
|
# limit to 2 releases
|
||||||
for version in 2.7.1 2.8.2; do
|
for version in 2.7.1 2.8.2; do
|
||||||
tox -e venv -- sahara-image-create -x -u -p $PLUGIN -i $distro -v $version
|
${TOX_EXECUTABLE} -e venv -- sahara-image-create -x -u -p $PLUGIN -i $distro -v $version
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
@ -20,13 +22,13 @@ case "$PLUGIN" in
|
||||||
# NOTE(vgridnev): Number of versions are growing; testing only 2 latest
|
# NOTE(vgridnev): Number of versions are growing; testing only 2 latest
|
||||||
# releases of CDH
|
# releases of CDH
|
||||||
for version in 5.9 5.11; do
|
for version in 5.9 5.11; do
|
||||||
tox -e venv -- sahara-image-create -x -u -p $PLUGIN -i $distro -v $version
|
${TOX_EXECUTABLE} -e venv -- sahara-image-create -x -u -p $PLUGIN -i $distro -v $version
|
||||||
find . -maxdepth 1 -name '*cloudera*.qcow2' -delete
|
find . -maxdepth 1 -name '*cloudera*.qcow2' -delete
|
||||||
sudo rm -rf ~/.cache/image-create
|
sudo rm -rf ~/.cache/image-create
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
tox -e venv -- sahara-image-create -x -u -p $PLUGIN
|
${TOX_EXECUTABLE} -e venv -- sahara-image-create -x -u -p $PLUGIN
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue