X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Ftemplate%2Fstart_build;h=43ef161088fff5e7d78d09ada234a4baffa4cd1b;hb=85dc239b834cfe437455d0bb815c667ca905edc6;hp=2bd9074b40b934444c5860794329cfb57a3685eb;hpb=9713ede3423f7f53bc52cc8b8c7f6eb601b6d30b;p=osm%2Fdevops.git diff --git a/jenkins/template/start_build b/jenkins/template/start_build index 2bd9074b..43ef1610 100755 --- a/jenkins/template/start_build +++ b/jenkins/template/start_build @@ -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