Create separate build job for foreman daily pipeline 29/529/3
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 12 May 2015 16:24:37 +0000 (18:24 +0200)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 12 May 2015 16:30:59 +0000 (18:30 +0200)
JIRA: OCTO-47

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

index 00d7f9b..3d98437 100644 (file)
     parameters:
         - genesis-parameters:
             installer: '{installer}'
     parameters:
         - genesis-parameters:
             installer: '{installer}'
-        - string:
-            name: EXTRA_PARAM
-            default: 'extra_value'
-            description: "Installer to use."
-        - string:
-            name: INSTALLER
-            default: 'overriden_value'
-            description: "Installer to use."
 
     scm:
         - git:
 
     scm:
         - git:
 
     builders:
         - 'build'
 
     builders:
         - 'build'
+        - 'upload-artifact'
 
 - job-template:
     name: 'genesis-{installer}-deploy'
 
 - job-template:
     name: 'genesis-{installer}-deploy'
             set -o pipefail
             set -x
 
             set -o pipefail
             set -x
 
-            echo "Hello World"
-            env
+            # create the cache directory if it doesn't exist
+            [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
+
+            # set ARTIFACT_VERSION
+            export ARTIFACT_VERSION=$(date +"%Y-%m-%d_%H-%M-%S")
+
+            # start the build
+            cd $WORKSPACE/$INSTALLER/ci
+            ./build.sh -v $ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
+
+- builder:
+    name: 'upload-artifact'
+    builders:
+        - shell: |
+            #!/bin/bash
+            set -o errexit
+            set -o nounset
+            set -o pipefail
+            set -x
+
+            # list the build output
+            ls -al $BUILD_DIRECTORY
 
 - builder:
     name: 'deploy'
 
 - builder:
     name: 'deploy'