Code Review
/
releng.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove all compass jobs
[releng.git]
/
jjb
/
releng
/
opnfv-docker.sh
diff --git
a/jjb/releng/opnfv-docker.sh
b/jjb/releng/opnfv-docker.sh
index
e647641
..
de39f06
100644
(file)
--- a/
jjb/releng/opnfv-docker.sh
+++ b/
jjb/releng/opnfv-docker.sh
@@
-23,9
+23,9
@@
function remove_containers_images()
#
# $ docker ps -a
# CONTAINER ID IMAGE COMMAND ...
#
# $ docker ps -a
# CONTAINER ID IMAGE COMMAND ...
- # 6a796ed40b8e opnfv/
compass
-tasks:latest "/bin/bash" ...
- # 99fcb59f4787 opnfv/
compass
-tasks-base:latest "/bin/bash" ...
- # cc5eee16b995 opnfv/
compass
-tasks-k8s "/bin/bash" ...
+ # 6a796ed40b8e opnfv/
example
-tasks:latest "/bin/bash" ...
+ # 99fcb59f4787 opnfv/
example
-tasks-base:latest "/bin/bash" ...
+ # cc5eee16b995 opnfv/
example
-tasks-k8s "/bin/bash" ...
#
# Cut image name by leading space and ending space or colon(tag)
if [[ -n "$(docker ps -a | grep " $DOCKER_REPO_NAME[ :]")" ]]; then
#
# Cut image name by leading space and ending space or colon(tag)
if [[ -n "$(docker ps -a | grep " $DOCKER_REPO_NAME[ :]")" ]]; then
@@
-44,9
+44,9
@@
function remove_containers_images()
#
# $ docker images
# REPOSITORY TAG IMAGE ID ...
#
# $ docker images
# REPOSITORY TAG IMAGE ID ...
- # opnfv/
compass
-tasks latest 6501569fd328 ...
- # opnfv/
compass
-tasks-base latest 8764fe29c434 ...
- # opnfv/
compass
-tasks-k8s latest 61094cac9e65 ...
+ # opnfv/
example
-tasks latest 6501569fd328 ...
+ # opnfv/
example
-tasks-base latest 8764fe29c434 ...
+ # opnfv/
example
-tasks-k8s latest 61094cac9e65 ...
#
# Cut image name by start of line and ending space
if [[ -n "$(docker images | grep "^$DOCKER_REPO_NAME ")" ]]; then
#
# Cut image name by start of line and ending space
if [[ -n "$(docker images | grep "^$DOCKER_REPO_NAME ")" ]]; then
@@
-130,12
+130,18
@@
if [[ -n "${ARCH_TAG}" ]]; then
ARCH_BUILD_ARG="--build-arg ARCH=${ARCH_TAG}"
fi
ARCH_BUILD_ARG="--build-arg ARCH=${ARCH_TAG}"
fi
+EXTRA_BUILD_ARGS=${EXTRA_BUILD_ARGS:-}
+if [ -n "${EXTRA_BUILD_ARGS}" ]; then
+ EXTRA_BUILD_ARGS=" "$(echo ${EXTRA_BUILD_ARGS})
+ EXTRA_BUILD_ARGS=${EXTRA_BUILD_ARGS// / --build-arg }
+fi
+
# Start the build
echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG"
echo "--------------------------------------------------------"
echo
cmd="docker build --pull=true --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BUILD_BRANCH
# Start the build
echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG"
echo "--------------------------------------------------------"
echo
cmd="docker build --pull=true --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BUILD_BRANCH
- $ARCH_BUILD_ARG
+ $ARCH_BUILD_ARG
$EXTRA_BUILD_ARGS
-f $DOCKERFILE $DOCKER_PATH"
echo ${cmd}
-f $DOCKERFILE $DOCKER_PATH"
echo ${cmd}