From 01c4f962aefc3880d80c09f4914dadda51e66440 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 31 May 2017 15:33:05 +0200 Subject: [PATCH] Add support to test Puppet 5 Allow to deploy Puppet 5 (experimental) when setting PUPPET_MAJ_VERSION=5 (currently done by experimental jobs). It will pull packages from nightly builds, so we can use it and see if things are working. Change-Id: I3d0f2f4309c425435370d7f7d4d367c62396c8fc --- functions | 2 +- run_tests.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/functions b/functions index 1c687fdf0..e0d38c668 100644 --- a/functions +++ b/functions @@ -170,7 +170,7 @@ install_puppet() { $SUDO rm -f /tmp/puppet.rpm if [ "${MANAGE_REPOS}" == "true" ] ; then - wget http://yum.puppetlabs.com/${PUPPET_RELEASE_FILE}-el-7.noarch.rpm -O /tmp/puppet.rpm + wget http://yum.puppetlabs.com/${PUPPET_URL_SUFFIX}${PUPPET_RELEASE_FILE}-el-7.noarch.rpm -O /tmp/puppet.rpm $SUDO rpm -ivh /tmp/puppet.rpm fi $SUDO yum install -y ${PUPPET_PKG} diff --git a/run_tests.sh b/run_tests.sh index 4c1fd95c7..764b21048 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -17,6 +17,7 @@ export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) source ${SCRIPT_DIR}/functions export WORKSPACE=${WORKSPACE:-/tmp} +export PUPPET_URL_SUFFIX= export PUPPET_MAJ_VERSION=${PUPPET_MAJ_VERSION:-4} export SCENARIO=${SCENARIO:-scenario001} export MANAGE_PUPPET_MODULES=${MANAGE_PUPPET_MODULES:-true} @@ -71,6 +72,14 @@ if [ $PUPPET_MAJ_VERSION == 4 ]; then export PUPPET_RELEASE_FILE=puppetlabs-release-pc1 export PUPPET_BASE_PATH=/etc/puppetlabs/code export PUPPET_PKG=${PUPPET_PKG:-puppet-agent} +elif [ $PUPPET_MAJ_VERSION == 5 ]; then + export PATH=${PATH}:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin + export PUPPET_RELEASE_FILE=puppet5-nightly-release + export PUPPET_BASE_PATH=/etc/puppetlabs/code + export PUPPET_PKG=${PUPPET_PKG:-puppet-agent} + if is_fedora; then + PUPPET_URL_SUFFIX='puppet5-nightly/' + fi fi print_header 'Start (run_tests.sh)'