X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fhost%2Fstart_build;h=f7ada68a35ebc54fa7598703fefa7c87af86248e;hb=3cc0316794cc75ecffdf2b969b4ad98d0dd7e826;hp=a78d3944e903c489b040b42fad2fb38e6008cfcc;hpb=9829cae3e6c071bde28a69d5411bb895d967f010;p=osm%2Fdevops.git diff --git a/jenkins/host/start_build b/jenkins/host/start_build index a78d3944..f7ada68a 100755 --- a/jenkins/host/start_build +++ b/jenkins/host/start_build @@ -30,6 +30,13 @@ export OSM_MDG=$1 shift OSM_load_config +if [ "$1" = "--build-container" ]; then + shift + [ $# -lt 1 ] && FATAL "missing container name with option --build-container" + export OSM_BUILD_CONTAINER=$1 + shift +fi + if ! container_exists $OSM_BUILD_CONTAINER; then CONTAINER_OPTS="" [[ "$OSM_BUILD_CONTAINER_PRIVILEGED" == yes ]] && CONTAINER_OPTS="$CONTAINER_OPTS -c security.privileged=true" @@ -41,7 +48,7 @@ if ! container_exists $OSM_BUILD_CONTAINER; then if [[ $OSM_BASE_IMAGE =~ $RE ]]; then container_exec $OSM_BUILD_CONTAINER yum -y install git tar make sudo else - container_exec $OSM_BUILD_CONTAINER apt -y install git realpath make sudo + container_exec $OSM_BUILD_CONTAINER apt-get -y install git realpath make sudo fi if [ ${OSM_USE_LOCAL_DEVOPS:-false} ]; then container_push_devops $OSM_BUILD_CONTAINER