projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug fixed in RO start_build
[osm/devops.git]
/
jenkins
/
host
/
start_build
diff --git
a/jenkins/host/start_build
b/jenkins/host/start_build
index
09f471b
..
555b8a2
100755
(executable)
--- a/
jenkins/host/start_build
+++ b/
jenkins/host/start_build
@@
-22,24
+22,40
@@
HERE=$(realpath $(dirname $0))
OSM_JENKINS=$(dirname $HERE)
. $OSM_JENKINS/common/all_funcs
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
export OSM_MDG=$1
+shift
OSM_load_config
if ! container_exists $OSM_BUILD_CONTAINER; then
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
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
else
- container_exec $OSM_BUILD_CONTAINER apt
install git
+ container_exec $OSM_BUILD_CONTAINER apt
-y install git realpath
fi
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
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
fi
+container_exec $OSM_BUILD_CONTAINER ./devops/jenkins/$OSM_MDG/start_build $*
+RC=$?
+INFO "$OSM_MDG build complete. Return code was $RC"
+exit $RC
-container_exec $OSM_BUILD_CONTAINER ./devops/jenkins/$OSM_MDG/start_build