[node-patches] Change in ovirt-node-iso[master]: move all temporary root-owned files to JENKINS_HOME

mburns at redhat.com mburns at redhat.com
Sun Feb 24 02:18:33 UTC 2013


Michael Burns has uploaded a new change for review.

Change subject: move all temporary root-owned files to JENKINS_HOME
......................................................................

move all temporary root-owned files to JENKINS_HOME

In some cases, cleanup will fail due to files owned by root
that the jenkins user can't cleanup.  These files are all in
ovirt-cache, so move ovirt-cache to $JENKINS_HOME.

Since we need to reference a local ovirt-repo, define a new variable
called LOCAL_OVIRT_REPO_DIR and reference that for everything that
OVIRT_CACHE was used for before.

OVIRT_CACHE will now be JENKINS_HOME/JOB_NAME so that multiple jobs
on the host will use different caches.

Change-Id: I2dfcbd518dd6c98a8effdc5aec3c4d6e5d260498
Signed-off-by: Mike Burns <mburns at redhat.com>
---
M jenkins.sh
1 file changed, 9 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node-iso refs/changes/60/12360/1

diff --git a/jenkins.sh b/jenkins.sh
index 7b191e3..b09a35d 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -25,24 +25,25 @@
 test -f Makefile && make -k distclean
 rm -rf ${WORKSPACE}/ovirt-node-tools ${WORKSPACE}/*iso ${WORKSPACE}/rpmbuild ${WORKSPACE}/manifest* ${WORKSPACE}/old_artifacts ${WORKSPACE}/ovirt-node-recipe
 
-OVIRT_CACHE_DIR=${WORKSPACE}/ovirt-cache
-OVIRT_LOCAL_REPO=file://${OVIRT_CACHE_DIR}/ovirt
+OVIRT_CACHE_DIR=${JENKINS_HOME}/ovirt-cache/${JOB_NAME}
+LOCAL_OVIRT_CACHE_DIR=${WORKSPACE}/ovirt-cache
+OVIRT_LOCAL_REPO=file://${LOCAL_OVIRT_CACHE_DIR}/ovirt
 export OVIRT_CACHE_DIR OVIRT_LOCAL_REPO
-if ls ${OVIRT_CACHE_DIR}/ovirt/noarch/ovirt-node-recipe*rpm >/dev/null 2>&1; then
+if ls ${LOCAL_OVIRT_CACHE_DIR}/ovirt/noarch/ovirt-node-recipe*rpm >/dev/null 2>&1; then
     RECIPE_RPM_NAME=ovirt-node-recipe
-elif ls ${OVIRT_CACHE_DIR}/ovirt/noarch/ovirt-node-tools*rpm >/dev/null 2>&1; then
+elif ls ${LOCAL_OVIRT_CACHE_DIR}/ovirt/noarch/ovirt-node-tools*rpm >/dev/null 2>&1; then
     RECIPE_RPM_NAME=ovirt-node-tools
 else
     echo "ERROR: no recipe rpm found"
     exit 4
 fi
 
-OVIRT_NODE_RECIPE_RPM=$(ls -t ${OVIRT_CACHE_DIR}/ovirt/noarch/${RECIPE_RPM_NAME}* | head -n1)
+OVIRT_NODE_RECIPE_RPM=$(ls -t ${LOCAL_OVIRT_CACHE_DIR}/ovirt/noarch/${RECIPE_RPM_NAME}* | head -n1)
 export HOME=${WORKSPACE}
 
-createrepo ${OVIRT_CACHE_DIR}/ovirt
+createrepo ${LOCAL_OVIRT_CACHE_DIR}/ovirt
 
-# ovirt-node recipe rpm should be copied to ${OVIRT_CACHE_DIR}/ovirt/noarch
+# ovirt-node recipe rpm should be copied to ${LOCAL_OVIRT_CACHE_DIR}/ovirt/noarch
 mkdir ${WORKSPACE}/${RECIPE_RPM_NAME}
 cd ${WORKSPACE}/${RECIPE_RPM_NAME}
 rpm2cpio ${OVIRT_NODE_RECIPE_RPM} | pax -r
@@ -65,7 +66,7 @@
 
 ./autogen.sh --with-recipe=${RECIPE_DIR} --with-build-number=${ONT_BUILD_NUMBER}${BUILD_NUMBER}
 
-make BUILD_TYPE=$BUILD_TYPE iso publish
+make BUILD_TYPE=$BUILD_TYPE iso rpms
 
 ISO_NAME=$(make verrel).iso
 # Get iso details


--
To view, visit http://gerrit.ovirt.org/12360
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2dfcbd518dd6c98a8effdc5aec3c4d6e5d260498
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node-iso
Gerrit-Branch: master
Gerrit-Owner: Michael Burns <mburns at redhat.com>



More information about the node-patches mailing list