From dde067b26873f8e4c290e467a0f13747369f9ff7 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 30 May 2017 13:51:18 -0600 Subject: [PATCH] Fix puppet install and execution issues When adding a repository in Ubuntu, one must run apt-get update prior to trying to install a package from the new repository. Additionally when this new package installs binaries in an alternative path, you need to ensure the PATH is properly updated for it to work. Change-Id: I285baa486221e496baa8e205bd7a92c33d07dd2f --- jenkins/jobs/macros.yaml | 1 + jenkins/jobs/puppet-module-jobs.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/jenkins/jobs/macros.yaml b/jenkins/jobs/macros.yaml index 351bc30c3b..0add4ef655 100644 --- a/jenkins/jobs/macros.yaml +++ b/jenkins/jobs/macros.yaml @@ -510,6 +510,7 @@ elif [ -f /usr/bin/apt-get ]; then wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb -O /tmp/puppet.deb sudo dpkg -i /tmp/puppet.deb + sudo apt-get update sudo apt-get install puppet-agent rm -rf /tmp/puppet.deb fi diff --git a/jenkins/jobs/puppet-module-jobs.yaml b/jenkins/jobs/puppet-module-jobs.yaml index ce86569be7..628bf0e170 100644 --- a/jenkins/jobs/puppet-module-jobs.yaml +++ b/jenkins/jobs/puppet-module-jobs.yaml @@ -350,6 +350,9 @@ project: $ZUUL_PROJECT - shell: | #!/bin/bash -xe + # NOTE(mwhahaha): puppet from puppet-agent-install builder is not in + # the standard path, so add puppetlabs bin to the path + export PATH=$PATH:/opt/puppetlabs/bin cd $ZUUL_PROJECT # try to find the modulename, ex: puppet-aodh # we have to use sed because workspace is puppet-aodh-branch-tarball