summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2019-03-27 12:43:20 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-03-27 12:43:20 +0000
commit288b95716bbf4392b19d782dbf0ee2d08f5d3e2c (patch)
tree6645a1b6bf199944c187cfdf91957d8a41d8943d /jjb
parenteabf9b985c7e1400a5efb09062e674f2b13e34b1 (diff)
parent7bae98970de0e2d9040aa109b381a1eaaf575247 (diff)
Merge changes Ic5489af9,I65d5b96e
* changes: Add job for building ONAP web portal image Provide a way to add extra arguements when building docker images
Diffstat (limited to 'jjb')
-rw-r--r--jjb/releng/opnfv-docker-arm.yaml5
-rw-r--r--jjb/releng/opnfv-docker.sh8
-rw-r--r--jjb/releng/opnfv-docker.yaml12
3 files changed, 24 insertions, 1 deletions
diff --git a/jjb/releng/opnfv-docker-arm.yaml b/jjb/releng/opnfv-docker-arm.yaml
index 7e87c5f0d..102069ad9 100644
--- a/jjb/releng/opnfv-docker-arm.yaml
+++ b/jjb/releng/opnfv-docker-arm.yaml
@@ -44,6 +44,7 @@
dockerdir: "docker"
docker_repo_name: "opnfv/{project}_aarch64"
arch_tag: ""
+ extra_build_args: ""
# yamllint disable rule:key-duplicates
dockerrepo:
@@ -177,6 +178,10 @@
name: ARCH_TAG
default: "{arch_tag}"
description: "If set, this value will be added to the docker image tag"
+ - string:
+ name: EXTRA_BUILD_ARGS
+ default: "{extra_build_args}"
+ description: "Whitespace separated key=value pairs. If set, these args will be used to build docker image"
properties:
- throttle:
diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh
index e64764128..174bb57b9 100644
--- a/jjb/releng/opnfv-docker.sh
+++ b/jjb/releng/opnfv-docker.sh
@@ -130,12 +130,18 @@ if [[ -n "${ARCH_TAG}" ]]; then
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
- $ARCH_BUILD_ARG
+ $ARCH_BUILD_ARG $EXTRA_BUILD_ARGS
-f $DOCKERFILE $DOCKER_PATH"
echo ${cmd}
diff --git a/jjb/releng/opnfv-docker.yaml b/jjb/releng/opnfv-docker.yaml
index 591452a74..14583393e 100644
--- a/jjb/releng/opnfv-docker.yaml
+++ b/jjb/releng/opnfv-docker.yaml
@@ -45,6 +45,7 @@
dockerfile: "Dockerfile"
dockerdir: "docker"
arch_tag: ""
+ extra_build_args: ""
# This is the dockerhub repo the image will be pushed to as
# 'opnfv/{dockerrepo}. See: DOCKER_REPO_NAME parameter.
@@ -203,6 +204,12 @@
dockerfile: 'Dockerfile.web'
<<: *master
<<: *other-receivers
+ - 'dovetail-webportal-web-onap':
+ project: 'dovetail-webportal'
+ dockerfile: 'Dockerfile.web'
+ extra_build_args: 'CONTAINER=onap GUI=onap-ui'
+ <<: *master
+ <<: *other-receivers
- 'nfvbench':
project: 'nfvbench'
<<: *master
@@ -415,6 +422,7 @@
dockerfile: "Dockerfile"
dockerdir: "docker"
arch_tag: ""
+ extra_build_args: ""
project:
# projects with jobs for master
@@ -466,6 +474,10 @@
name: ARCH_TAG
default: "{arch_tag}"
description: "If set, this value will be added to the docker image tag as a prefix"
+ - string:
+ name: EXTRA_BUILD_ARGS
+ default: "{extra_build_args}"
+ description: "Whitespace separated key=value pairs. If set, these args will be used to build docker image"
properties:
- throttle: