From: garciadeblas Date: Wed, 31 Aug 2016 12:47:41 +0000 (+0200) Subject: Changes in RO jenkins jobs to support compilation of a specific GIT_COMMIT from gerrit X-Git-Tag: v1.0.0~34 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=a8cbb9194d6b791d58c631d23a655ea94623d037;p=osm%2Fdevops.git Changes in RO jenkins jobs to support compilation of a specific GIT_COMMIT from gerrit Change-Id: Idb0f8fa7a0ed2739349a4c7784583f2405a08e87 Signed-off-by: garciadeblas --- diff --git a/jenkins/RO/start_build b/jenkins/RO/start_build index abcf789f..b6336792 100755 --- a/jenkins/RO/start_build +++ b/jenkins/RO/start_build @@ -33,14 +33,19 @@ else git clone $OSM_GIT_URL/$OSM_MDG cd $OSM_MDG fi +if [ $# -gt 0 ]; then + git checkout $1 +fi + INFO "starting build" ### for start_build ### put your commands here to ### build, test and produce coverage reports -#RC=0 -RC=`python -m py_compile *.py` +rm *.pyc +python -m py_compile *.py +RC=$? INFO "done, RC=$RC" exit $RC diff --git a/jenkins/host/start_build b/jenkins/host/start_build index dd697999..c3df393d 100755 --- a/jenkins/host/start_build +++ b/jenkins/host/start_build @@ -25,6 +25,7 @@ OSM_JENKINS=$(dirname $HERE) [ $# -eq 1 ] || FATAL "arg is MDG name" export OSM_MDG=$1 +shift OSM_load_config if ! container_exists $OSM_BUILD_CONTAINER; then @@ -53,7 +54,7 @@ else fi fi -container_exec $OSM_BUILD_CONTAINER ./devops/jenkins/$OSM_MDG/start_build +container_exec $OSM_BUILD_CONTAINER ./devops/jenkins/$OSM_MDG/start_build $* RC=$? INFO "$OSM_MDG build complete. Return code was $RC" exit $RC