X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2FSO%2Fstart_build;h=a672e149fc35d1443ee28d4e13986eca82833295;hb=3cc0316794cc75ecffdf2b969b4ad98d0dd7e826;hp=8094a39de0c760d609c79cd54ff5d7e9758c9b83;hpb=7d4bb73640c4d902e9d4d7bd9cf2090f9388aa32;p=osm%2Fdevops.git diff --git a/jenkins/SO/start_build b/jenkins/SO/start_build index 8094a39d..a672e149 100755 --- a/jenkins/SO/start_build +++ b/jenkins/SO/start_build @@ -25,32 +25,9 @@ OSM_JENKINS=$(dirname $HERE) # SET YOU MDG repository name here export OSM_MDG=SO OSM_load_config +OSM_git_checkout "$@" - -# 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 - -if [ $# -gt 0 ]; then - if [ "$1" = "checkout" ]; then - INFO "Code to compile: '$2'" - git checkout $2 - else - 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" - fi -else - INFO "Code to compile: master" - git checkout master -fi +trap 'WARNING "INTERRUPT"; exit 1' INT INFO "starting build" make clean || FATAL "make clean failed"