X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2FUI%2Fstart_build;h=af495e961cb5762c3d0a9359bfda378de37b0342;hb=1959ecd96faffe052d37b7f30a0892a34f3950ac;hp=b05a7e26b182f8dcd3ae973caf0965197228f740;hpb=9713ede3423f7f53bc52cc8b8c7f6eb601b6d30b;p=osm%2Fdevops.git diff --git a/jenkins/UI/start_build b/jenkins/UI/start_build index b05a7e26..af495e96 100755 --- a/jenkins/UI/start_build +++ b/jenkins/UI/start_build @@ -39,9 +39,14 @@ else fi 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" + 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