X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=jenkins%2FRO%2Fstart_build;h=0db007b715bd6539abc7910d63d36fc24743f3b2;hb=bcc2bc4c3f74e856bb1badb0a6a6aa0e84e07a1f;hp=b6336792ede9a4ebc7e9794b5c9021e10c170355;hpb=a8cbb9194d6b791d58c631d23a655ea94623d037;p=osm%2Fdevops.git diff --git a/jenkins/RO/start_build b/jenkins/RO/start_build index b6336792..0db007b7 100755 --- a/jenkins/RO/start_build +++ b/jenkins/RO/start_build @@ -27,14 +27,15 @@ OSM_load_config if [ -d $OSM_MDG ]; then INFO "reusing existing workspace" cd $OSM_MDG - git pull + 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 - git checkout $1 + git fetch origin +refs/for/master || FATAL "git fetch didn't work" + git checkout $1 || FATAL "git checkout '$1' didn't work" fi INFO "starting build"