Make beaker tests honour puppet_gem_version

This commit was correct [1] when it added the
puppet_gem_version ansible var to the jobs to
restrict the gems version in puppet-openstack_spec_helper.

However since we haven't modified it to read the
variable and set the PUPPET_GEM_VERSION environment
variable it wasn't honoured by the spec helper when
it installed the puppet gem like done in [2].

[1] https://review.openstack.org/#/c/632962/
[2] d61f652b0a/playbooks/run-unit-tests.yaml (L6)

Change-Id: I61cb86b42d2ce12e9eabed3aac7b4b185ca987b5
This commit is contained in:
Tobias Urdin 2019-01-25 09:48:39 +01:00
parent 6ea5581a38
commit 748c877a12
4 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,9 @@
shell:
cmd: |
trap "{{ ansible_user_dir }}/workspace/openstack/puppet-openstack-integration/copy_logs.sh" EXIT
if [ "{{ puppet_gem_version }}" != "latest" ]; then
export PUPPET_GEM_VERSION='~> {{ puppet_gem_version }}'
fi
export BEAKER_PUPPET_COLLECTION=puppet5
export BEAKER_set=nodepool-{{ nodepool_type }}
export BEAKER_debug=yes

View File

@ -25,6 +25,9 @@
set -e
set -x
trap "{{ ansible_user_dir }}/workspace/openstack/puppet-openstack-integration/copy_logs.sh" EXIT
if [ "{{ puppet_gem_version }}" != "latest" ]; then
export PUPPET_GEM_VERSION='~> {{ puppet_gem_version }}'
fi
export BEAKER_PUPPET_COLLECTION=puppet5
export BEAKER_set=nodepool-{{ nodepool_type }}
./run_beaker_tests.sh

View File

@ -184,3 +184,4 @@
voting: false
vars:
nodepool_type: bionic
puppet_gem_version: latest

View File

@ -51,3 +51,4 @@
- ^.gitignore$
vars:
nodepool_type: bionic
puppet_gem_version: latest