apex: adds brahmaputra and moves daily to use baremetal 79/6579/6
authorTim Rozet <trozet@redhat.com>
Wed, 13 Jan 2016 17:18:03 +0000 (12:18 -0500)
committerTim Rozet <trozet@redhat.com>
Wed, 13 Jan 2016 21:33:58 +0000 (16:33 -0500)
Changes include:
 - Extra slash fixed in GS_URL
 - "brahmaputra.1.rc0" now used as the brahmaputra artifact version

Change-Id: I0b248d149f166ab174bb8b08ffb25e38c42a9457
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex.yml

index be595d4..186c502 100644 (file)
@@ -14,6 +14,9 @@
         - master:
             branch: 'master'
             gs-pathname: ''
+        - brahmaputra:
+            branch: 'stable/brahmaputra'
+            gs-pathname: '/brahmaputra'
 
     project: 'apex'
 
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
             description: "Used for overriding the GIT URL coming from parameters macro."
+        - string:
+            name: ARTIFACT_VERSION
+            default: 'dev'
+            description: "Artifact version type"
 
     scm:
         - gerrit-trigger-scm:
                 - "apex-build.*"
 
     triggers:
-        - 'apex-{stream}'
+        - 'apex-master'
 
     builders:
         - trigger-builds:
             git-revision: true
             block: true
         - trigger-builds:
-          - project: 'apex-deploy-virtual-{stream}'
+          - project: 'apex-deploy-baremetal-{stream}'
             git-revision: true
             block: true
         - trigger-builds:
             name: ARTIFACT_NAME
             default: 'latest'
             description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
+        - string:
+            name: ARTIFACT_VERSION
+            default: 'daily'
+            description: "Artifact version type"
         - string:
             name: BUILD_DIRECTORY
             default: $WORKSPACE/build_output
             description: "Directory where the build artifact will be located upon the completion of the build."
         - string:
             name: CACHE_DIRECTORY
-            default: $HOME/opnfv/cache/{gs-pathname}
+            default: $HOME/opnfv/cache{gs-pathname}
             description: "Directory where the cache to be used during the build is located."
         - string:
             name: GIT_BASE
             description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
         - string:
             name: GS_URL
-            default: artifacts.opnfv.org/$PROJECT/{gs-pathname}
+            default: artifacts.opnfv.org/$PROJECT{gs-pathname}
             description: "URL to Google Storage."
 
 ########################
             # create the cache directory if it doesn't exist
             [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
             # set OPNFV_ARTIFACT_VERSION
-            export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
+            if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then
+              export OPNFV_ARTIFACT_VERSION="bramaputra.1.rc0"
+            else
+              if [ "$ARTIFACT_VERSION" == "dev" ]; then
+                export OPNFV_ARTIFACT_VERSION=dev${BUILD_NUMBER}
+              elif [ "$ARTIFACT_VERSION" == "daily" ]; then
+                export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d")
+              else
+                export OPNFV_ARTIFACT_VERSION=${ARTIFACT_VERSION}
+              fi
+            fi
             # start the build
             cd $WORKSPACE/ci
             ./build.sh -v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY