From 9c1616b6594a3460bd2fbde613516df08e654b1b Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 16 Jul 2011 16:46:58 -0400 Subject: [PATCH] Fixed a home dir/permissions problem. --- modules/jenkins_slave/manifests/slavecirepo.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/jenkins_slave/manifests/slavecirepo.pp b/modules/jenkins_slave/manifests/slavecirepo.pp index e664c6a943..47120b654d 100644 --- a/modules/jenkins_slave/manifests/slavecirepo.pp +++ b/modules/jenkins_slave/manifests/slavecirepo.pp @@ -5,18 +5,18 @@ define slavecirepo($ensure = present) { exec { "Clone openstack-ci git repo": path => "/bin:/usr/bin", environment => "HOME=/home/jenkins", - command => "git clone git://github.com/openstack/openstack-ci.git /home/jenkins/openstack-ci", - user => "jenkins", - group => "jenkins", + command => "sudo -H -u jenkins -i git clone git://github.com/openstack/openstack-ci.git /home/jenkins/openstack-ci", + user => "root", + group => "root", unless => "$repo_there", logoutput => on_failure, } exec { "Update openstack-ci git repo": path => "/bin:/usr/bin", environment => "HOME=/home/jenkins", - command => "bash -c 'cd /home/jenkins/openstack-ci && git pull'", - user => "jenkins", - group => "jenkins", + command => "sudo -H -u jenkins -i bash -c 'cd /home/jenkins/openstack-ci && git pull'", + user => "root", + group => "root", onlyif => "$repo_there", logoutput => on_failure, }