summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCiprian Barbu <ciprian.barbu@enea.com>2016-05-02 14:48:07 +0300
committerCiprian Barbu <ciprian.barbu@enea.com>2016-05-02 14:48:07 +0300
commita77207cece2154246ab6520837b07f0b49f0a235 (patch)
treeb514a2ca882603a9a2085c949c0122a5d42385d2
parente274ceb5e8919439d33f80c014cda00fdb669aaa (diff)
Functest: add support to pass custom parameters to docker
This makes it possible to pass extra environments or volumes to docker by listing them in a file at ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG}. This way different parameter (env vars and volumes) can be specified for stable and master. Change-Id: I010fae9802dd413f0ca6ae9fb3ef0f03b81db3c2 Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
-rw-r--r--jjb/functest/functest-ci-jobs.yml4
1 files changed, 3 insertions, 1 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 0ee73b0c6..8bcf4c9de 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -294,11 +294,13 @@
mkdir -p ${dir_result}
sudo rm -rf ${dir_result}/*
res_volume="-v ${dir_result}:/home/opnfv/functest/results"
+ custom_params=
+ test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(cat ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG})
echo "Functest: Pulling image opnfv/functest:${DOCKER_TAG}"
docker pull opnfv/functest:$DOCKER_TAG >${redirect}
- cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} opnfv/functest:${DOCKER_TAG} /bin/bash"
+ cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} ${custom_params} opnfv/functest:${DOCKER_TAG} /bin/bash"
echo "Functest: Running docker run command: ${cmd}"
${cmd} >${redirect}
docker ps -a >${redirect}