Adding Prometheus Kafka Exporter Charm
[osm/devops.git] / jenkins / template / start_build
index 2bd9074..43ef161 100755 (executable)
@@ -25,28 +25,7 @@ OSM_JENKINS=$(dirname $HERE)
 # SET YOU MDG repository name here
 export OSM_MDG=XXXX
 OSM_load_config
-
-
-# Here is an example for how to handle an incremental build
-if [ -d $OSM_MDG ]; then
-       INFO "reusing existing workspace"
-       cd $OSM_MDG
-       git pull 
-else
-       INFO "cloning MDG $OSM_MDG from $OSM_GIT_URL/$OSM_MDG"
-       git clone $OSM_GIT_URL/$OSM_MDG
-       cd $OSM_MDG
-fi
-
-# Gerrit arranges to call this script with two parameters -- the refspec and commit ID that needs to be built
-if [ $# -gt 0 ]; then
-    INFO "Code to compile: gerrit refspec '$1', commit-id: '$2'"
-    git fetch origin $1 || FATAL "git fetch origin '$1' didn't work"
-    git checkout -f $2 || FATAL "git checkout -f '$2' didn't work"
-else
-    INFO "Code to compile: master"
-    git checkout master
-fi
+OSM_git_checkout "$@"
 
 INFO "starting build"
 ### for start_build