X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=jenkins%2Fhost%2Fstart_build;h=555b8a264197f58c1a88cd28e7606c27e550ddc9;hb=17edada9522c1418839c8b4c818ee9920c6cf950;hp=06ce3a6eb49b654735a40342b10fc60ad11318c8;hpb=f937a8bd0c2244b1011ea06865092539c45c9679;p=osm%2Fdevops.git diff --git a/jenkins/host/start_build b/jenkins/host/start_build index 06ce3a6e..555b8a26 100755 --- a/jenkins/host/start_build +++ b/jenkins/host/start_build @@ -22,9 +22,10 @@ HERE=$(realpath $(dirname $0)) OSM_JENKINS=$(dirname $HERE) . $OSM_JENKINS/common/all_funcs -[ $# -eq 1 ] || FATAL "arg is MDG name" +[ $# -lt 1 ] && FATAL "arg is MDG name" export OSM_MDG=$1 +shift OSM_load_config if ! container_exists $OSM_BUILD_CONTAINER; then @@ -36,16 +37,24 @@ if ! container_exists $OSM_BUILD_CONTAINER; then wait_container_up $OSM_BUILD_CONTAINER RE="fedora|fc[0-9]" if [[ $OSM_BASE_IMAGE =~ $RE ]]; then - container_exec $OSM_BUILD_CONTAINER yum -y install git + container_exec $OSM_BUILD_CONTAINER yum -y install git tar else container_exec $OSM_BUILD_CONTAINER apt -y install git realpath fi - container_exec $OSM_BUILD_CONTAINER git clone ${OSM_GIT_URL}/devops + if [ ${OSM_USE_LOCAL_DEVOPS:-false} ]; then + container_push_devops $OSM_BUILD_CONTAINER + else + container_exec $OSM_BUILD_CONTAINER git clone ${OSM_GIT_URL}/devops + fi else - container_exec $OSM_BUILD_CONTAINER git -C devops pull + if [ ${OSM_USE_LOCAL_DEVOPS:-false} ]; then + container_push_devops $OSM_BUILD_CONTAINER + else + container_exec $OSM_BUILD_CONTAINER git -C devops pull + 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