X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=jenkins%2Fhost%2Fstart_build;h=dd69799980c5d0daf9e984baf37900e5635b0aab;hb=refs%2Fchanges%2F56%2F256%2F1;hp=d6fbea8d99bffd4f8e6c8ad9452fc0460df420d3;hpb=19215383cc752f3693e0a6ed6633a3f9951d4a21;p=osm%2Fdevops.git diff --git a/jenkins/host/start_build b/jenkins/host/start_build index d6fbea8d..dd697999 100755 --- a/jenkins/host/start_build +++ b/jenkins/host/start_build @@ -28,21 +28,33 @@ export OSM_MDG=$1 OSM_load_config if ! container_exists $OSM_BUILD_CONTAINER; then - create_container $OSM_BASE_IMAGE $OSM_BUILD_CONTAINER + if [[ "$OSM_BUILD_CONTAINER_PRIVILEGED" == yes ]]; then + create_privileged_container $OSM_BASE_IMAGE $OSM_BUILD_CONTAINER + else + create_container $OSM_BASE_IMAGE $OSM_BUILD_CONTAINER + fi 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 install git + 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 RC=$? INFO "$OSM_MDG build complete. Return code was $RC" exit $RC +