X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2FSO%2Fstart_build;h=fa1e1c4563e0f3e1c5275e5ff28a1ee8adbab81c;hb=3c15859bee2403751e8713471870ee064fbd7586;hp=85d2ca7c318b7325c0beaaed259134a0d0e2aecf;hpb=d0f2310b6d6d8738284320d7601c6ffcbee85cea;p=osm%2Fdevops.git diff --git a/jenkins/SO/start_build b/jenkins/SO/start_build index 85d2ca7c..fa1e1c45 100755 --- a/jenkins/SO/start_build +++ b/jenkins/SO/start_build @@ -29,21 +29,27 @@ 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 + 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 + INFO "cloning MDG $OSM_MDG from $OSM_GIT_URL/$OSM_MDG" + git clone $OSM_GIT_URL/$OSM_MDG + cd $OSM_MDG fi -INFO "starting build" -### for start_build -### put your commands here to -### build, test and produce coverage reports +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 -./BUILD.sh +INFO "starting build" +make clean || FATAL "make clean failed" +./BUILD_UB.sh RC=$?