From 748c877a12db8aec002cda6f63c5fb28176dc59f Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Fri, 25 Jan 2019 09:48:39 +0100 Subject: [PATCH] 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] https://github.com/openstack/puppet-openstack-integration/blob/d61f652b0aa55b66c2510f2dd303b4216d4e2466/playbooks/run-unit-tests.yaml#L6 Change-Id: I61cb86b42d2ce12e9eabed3aac7b4b185ca987b5 --- playbooks/run-beaker-tests.yaml | 3 +++ playbooks/run-libraries-beaker-tests.yaml | 3 +++ zuul.d/base.yaml | 1 + zuul.d/beaker.yaml | 1 + 4 files changed, 8 insertions(+) diff --git a/playbooks/run-beaker-tests.yaml b/playbooks/run-beaker-tests.yaml index a85fd101e..c1e28e0d7 100644 --- a/playbooks/run-beaker-tests.yaml +++ b/playbooks/run-beaker-tests.yaml @@ -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 diff --git a/playbooks/run-libraries-beaker-tests.yaml b/playbooks/run-libraries-beaker-tests.yaml index ea458a59c..25e00ef78 100644 --- a/playbooks/run-libraries-beaker-tests.yaml +++ b/playbooks/run-libraries-beaker-tests.yaml @@ -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 diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 787786328..1be6a9e47 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -184,3 +184,4 @@ voting: false vars: nodepool_type: bionic + puppet_gem_version: latest diff --git a/zuul.d/beaker.yaml b/zuul.d/beaker.yaml index 6c15ac0d1..1823eb85e 100644 --- a/zuul.d/beaker.yaml +++ b/zuul.d/beaker.yaml @@ -51,3 +51,4 @@ - ^.gitignore$ vars: nodepool_type: bionic + puppet_gem_version: latest