Enable cache for fuel build 06/206/2
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Thu, 26 Mar 2015 22:40:11 +0000 (23:40 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Thu, 26 Mar 2015 22:49:55 +0000 (23:49 +0100)
Use common cache for all build jobs.

JIRA: OCTO-11

Change-Id: If242c87e2b6231101744dbb822ca71b8a9e80614
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/genesis/genesis.yml

index 843d4b3..8c5ffbd 100644 (file)
 
     project-type: freestyle
 
-    disabled: true
-
     node: ericsson-build
 
     parameters:
             set -o pipefail
             set -x
 
+            # set/create the cache location
+            OPNFV_FUEL_CACHE="$(dirname $WORKSPACE)/opnfv_fuel_cache"
+            [[ -d $OPNFV_FUEL_CACHE ]] || mkdir -p $OPNFV_FUEL_CACHE
+
+            # do the build
             cd $WORKSPACE/fuel/ci
-            ./build.sh $BUILD_DIRECTORY
+            ./build.sh -c file://$OPNFV_FUEL_CACHE $BUILD_DIRECTORY
+
+            # list the build artifacts
             ls -al $BUILD_DIRECTORY
 
 - builder:
             set -o pipefail
             set -x
 
+            # set/create the cache location
+            OPNFV_FUEL_CACHE="$(dirname $WORKSPACE)/opnfv_fuel_cache"
+            [[ -d $OPNFV_FUEL_CACHE ]] || mkdir -p $OPNFV_FUEL_CACHE
+
+            # do the build
             cd $WORKSPACE/fuel/ci
-            ./build.sh -f t $BUILD_DIRECTORY
+            ./build.sh -c file://$OPNFV_FUEL_CACHE $BUILD_DIRECTORY
+
+            # list the build artifacts
             ls -al $BUILD_DIRECTORY
 
 - builder:
             set -o pipefail
             set -x
 
+            # set/create the cache location
+            OPNFV_FUEL_CACHE="$(dirname $WORKSPACE)/opnfv_fuel_cache"
+            [[ -d $OPNFV_FUEL_CACHE ]] || mkdir -p $OPNFV_FUEL_CACHE
+
+            # do the build
             cd $WORKSPACE/fuel/ci
-            ./build.sh -f t $BUILD_DIRECTORY
+            ./build.sh -f t -c file://$OPNFV_FUEL_CACHE $BUILD_DIRECTORY
+
+            # list the build artifacts
             ls -al $BUILD_DIRECTORY
 
 - builder: