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.

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 commit 2d0c3a8b98)
(cherry picked from commit 0a9a43cb76)
(cherry picked from commit cdf83a23a0)
(cherry picked from commit 96abd08c28)
changes/91/749891/1
Luigi Toscano 1 month ago
parent
commit
11e4ab2583
4 changed files with 8 additions and 4 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
    -3
      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

@@ -2,3 +2,4 @@
sahara_image_elements_src_dir: "{{ zuul.projects['opendev.org/openstack/sahara-image-elements'].src_dir }}"
sahara_build_directory: /var/tmp/sahara-image-build
sahara_plugin: vanilla
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 }}"
command: ./tools/gate/build-images "{{ sahara_plugin }}" "{{ tox_executable }}"
args:
chdir: "{{ sahara_image_elements_src_dir }}"

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

@@ -1,6 +1,8 @@
#!/bin/bash -xe

PLUGIN=$1
TOX_EXECUTABLE=${2:-'tox'}

export DIB_MIN_TMPFS=10
case "$PLUGIN" in
"vanilla")
@@ -8,7 +10,7 @@ case "$PLUGIN" in
for distro in ubuntu centos7; do
# limit to 2 releases
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
;;
@@ -20,13 +22,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