From ad5546a400ba7d634fdc08cabeebe83844fa5ed1 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Tue, 7 Jun 2016 17:58:23 -0400 Subject: [PATCH] Rename PUPPET_VERSION to PUPPET_MAJ_VERSION PUPPET_VERSION is already used by puppetlabs/beaker and we don't want to overlap with this variable. So let's rename it to PUPPET_MAJ_VERSION to avoid strange behaviors when running Beaker jobs. Change-Id: I74be2eec2be53f59af196f37ee348ff6856af8bc --- install_modules.sh | 2 +- install_modules_unit.sh | 2 +- run_tests.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install_modules.sh b/install_modules.sh index 7478ca3ea..4932e8b18 100755 --- a/install_modules.sh +++ b/install_modules.sh @@ -6,7 +6,7 @@ if [ -n "${GEM_HOME}" ]; then GEM_BIN_DIR=${GEM_HOME}/bin/ fi -if [ "${PUPPET_VERSION}" = 4 ]; then +if [ "${PUPPET_MAJ_VERSION}" = 4 ]; then export PUPPET_BASE_PATH=/etc/puppetlabs/code export PATH=${PATH}:/opt/puppetlabs/bin else diff --git a/install_modules_unit.sh b/install_modules_unit.sh index fb197d360..730cd41b2 100755 --- a/install_modules_unit.sh +++ b/install_modules_unit.sh @@ -10,7 +10,7 @@ if [ -n "${GEM_HOME}" ]; then GEM_BIN_DIR=${GEM_HOME}/bin/ fi -if [ "${PUPPET_VERSION}" = 4 ]; then +if [ "${PUPPET_MAJ_VERSION}" = 4 ]; then export PUPPET_BASE_PATH=/etc/puppetlabs/code else export PUPPET_BASE_PATH=/etc/puppet diff --git a/run_tests.sh b/run_tests.sh index 2e7ba1e03..6073d725a 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. -export PUPPET_VERSION=${PUPPET_VERSION:-3} +export PUPPET_MAJ_VERSION=${PUPPET_MAJ_VERSION:-3} export SCENARIO=${SCENARIO:-scenario001} export MANAGE_PUPPET_MODULES=${MANAGE_PUPPET_MODULES:-true} export MANAGE_REPOS=${MANAGE_REPOS:-true} @@ -21,7 +21,7 @@ export PUPPET_ARGS=${PUPPET_ARGS:-} export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) export DISTRO=$(lsb_release -c -s) -if [ $PUPPET_VERSION == 4 ]; then +if [ $PUPPET_MAJ_VERSION == 4 ]; then export PATH=${PATH}:/opt/puppetlabs/bin export PUPPET_RELEASE_FILE=puppetlabs-release-pc1 export PUPPET_BASE_PATH=/etc/puppetlabs/code @@ -66,7 +66,7 @@ if uses_debs; then # Puppetlabs packaging: # - trusty: puppet3 and puppet4 # - xenial: puppet4 only - if [[ ${DISTRO} == "trusty" ]] || [[ ${DISTRO} == "xenial" && ${PUPPET_VERSION} == 4 ]]; then + if [[ ${DISTRO} == "trusty" ]] || [[ ${DISTRO} == "xenial" && ${PUPPET_MAJ_VERSION} == 4 ]]; then if dpkg -l $PUPPET_RELEASE_FILE >/dev/null 2>&1; then $SUDO apt-get purge -y $PUPPET_RELEASE_FILE fi