Browse Source

Fix the buildimages jobs: call the ensure-tox role

... and use its output.

tox is not available by default on the images anymore.

Change-Id: If5ea0ffdfc51860842c19f0a6f238127d42eb292
(cherry picked from commit 2d0c3a8b98)
(cherry picked from commit 0a9a43cb76)
changes/67/749767/1
Luigi Toscano 1 month ago
parent
commit
cdf83a23a0
4 changed files with 8 additions and 5 deletions
  1. +1
    -0
      playbooks/buildimages/run.yaml
  2. +1
    -0
      roles/build-sahara-images-dib/defaults/main.yaml
  3. +1
    -1
      roles/build-sahara-images-dib/tasks/main.yaml
  4. +5
    -4
      tools/gate/build-images

+ 1
- 0
playbooks/buildimages/run.yaml View File

@@ -1,3 +1,4 @@
- hosts: all
roles:
- ensure-tox
- build-sahara-images-dib

+ 1
- 0
roles/build-sahara-images-dib/defaults/main.yaml View File

@@ -4,3 +4,4 @@ sahara_build_directory: /var/tmp/sahara-image-build
sahara_plugin: vanilla
sahara_plugin_version: ''
sahara_plugin_distro: ''
tox_executable: 'tox'

+ 1
- 1
roles/build-sahara-images-dib/tasks/main.yaml View File

@@ -1,4 +1,4 @@
- name: Build all the images for the selected plugin
command: ./tools/gate/build-images "{{ sahara_plugin }}" "{{ sahara_plugin_version }}" "{{ sahara_plugin_distro }}"
command: ./tools/gate/build-images "{{ sahara_plugin }}" "{{ sahara_plugin_version }}" "{{ sahara_plugin_distro }}" "{{ tox_executable }}"
args:
chdir: "{{ sahara_image_elements_src_dir }}"

+ 5
- 4
tools/gate/build-images View File

@@ -3,6 +3,7 @@
PLUGIN=$1
PLUGIN_VERSION=${2:-''}
PLUGIN_DISTRO=${3:-''}
TOX_EXECUTABLE=${4:-'tox'}

export DIB_MIN_TMPFS=10

@@ -25,7 +26,7 @@ if [ -n "${PLUGIN}" ] && [ -n "${PLUGIN_VERSION}" ] && [ -n "${PLUGIN_DISTRO}" ]
VERSION_FLAG=""
;;
esac
tox -e venv -- sahara-image-create -x -u -p ${PLUGIN} -i ${PLUGIN_DISTRO} ${VERSION_FLAG}
${TOX_EXECUTABLE} -e venv -- sahara-image-create -x -u -p ${PLUGIN} -i ${PLUGIN_DISTRO} ${VERSION_FLAG}
exit
fi

@@ -36,7 +37,7 @@ case "$PLUGIN" in
for distro in ubuntu centos7; do
# limit to 4 releases
for version in 2.7.1 2.7.5 2.8.2 3.0.1; 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
;;
@@ -48,13 +49,13 @@ case "$PLUGIN" in
# NOTE(vgridnev): Number of versions are growing; testing only 2 latest
# releases of CDH
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
sudo rm -rf ~/.cache/image-create
done
done
;;
*)
tox -e venv -- sahara-image-create -x -u -p $PLUGIN
${TOX_EXECUTABLE} -e venv -- sahara-image-create -x -u -p $PLUGIN
;;
esac

Loading…
Cancel
Save