summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-04-07 17:38:46 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-04-07 18:27:28 +0200
commit55794804cddd765997fe4a81e52d4c1d37a862e7 (patch)
tree1140a1fe832aabf3f213fbdb06967571e816e435 /jjb/functest
parent285a9448d4126e0cd66914a7dcbd698ff7ecea00 (diff)
Split functest-kubernetes into smaller containers
It conforms with the Docker slicing model proposed by Functest. See https://gerrit.opnfv.org/gerrit/#/c/55129/ Change-Id: Ic036034f043f995cba468fa0437e47a6129584b4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb/functest')
-rwxr-xr-xjjb/functest/functest-k8.sh30
-rw-r--r--jjb/functest/functest-kubernetes-docker.yml28
2 files changed, 36 insertions, 22 deletions
diff --git a/jjb/functest/functest-k8.sh b/jjb/functest/functest-k8.sh
index 9017354cc..419c4e051 100755
--- a/jjb/functest/functest-k8.sh
+++ b/jjb/functest/functest-k8.sh
@@ -42,17 +42,23 @@ DOCKER_TAG=`[[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*
set +e
-FUNCTEST_IMAGE=opnfv/functest-kubernetes:${DOCKER_TAG}
-echo "Pulling Docker image ${FUNCTEST_IMAGE} ..."
-docker pull ${FUNCTEST_IMAGE}>/dev/null
-cmd_opt="run_tests -r -t all"
-cmd="docker run --rm ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'"
-echo "Running Functest k8s test cases, CMD: ${cmd}"
-eval ${cmd}
-ret_value=$?
-
ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
echo 0 > ${ret_val_file}
-if [ ${ret_value} != 0 ]; then
- echo ${ret_value} > ${ret_val_file}
-fi
+
+FUNCTEST_IMAGES="\
+opnfv/functest-kubernetes-healthcheck:${DOCKER_TAG} \
+opnfv/functest-kubernetes-smoke:${DOCKER_TAG} \
+opnfv/functest-kubernetes-features:${DOCKER_TAG}"
+cmd_opt="run_tests -r -t all"
+
+for image in ${FUNCTEST_IMAGES}; do
+ echo "Pulling Docker image ${image} ..."
+ docker pull "${image}" >/dev/null
+ cmd="docker run --rm ${envs} ${volumes} ${image} /bin/bash -c '${cmd_opt}'"
+ echo "Running Functest k8s test cases, CMD: ${cmd}"
+ eval ${cmd}
+ ret_value=$?
+ if [ ${ret_value} != 0 ]; then
+ echo ${ret_value} > ${ret_val_file}
+ fi
+done
diff --git a/jjb/functest/functest-kubernetes-docker.yml b/jjb/functest/functest-kubernetes-docker.yml
index de1895dce..2085251c6 100644
--- a/jjb/functest/functest-kubernetes-docker.yml
+++ b/jjb/functest/functest-kubernetes-docker.yml
@@ -23,6 +23,9 @@
# yamllint disable rule:key-duplicates
image:
- 'core'
+ - 'healthcheck'
+ - 'smoke'
+ - 'features'
# settings for jobs run in multijob phases
build-job-settings: &build-job-settings
@@ -89,6 +92,20 @@
projects:
- name: 'functest-kubernetes-core-docker-build-amd64-{stream}'
<<: *build-job-settings
+ - multijob:
+ name: 'build functest-kubernetes-[healthcheck,features] image'
+ execution-type: PARALLEL
+ projects:
+ - name: 'functest-kubernetes-healthcheck-docker-build-amd64-{stream}'
+ <<: *build-job-settings
+ - name: 'functest-kubernetes-features-docker-build-amd64-{stream}'
+ <<: *build-job-settings
+ - multijob:
+ name: 'build functest-kubernetes-smoke image'
+ execution-type: PARALLEL
+ projects:
+ - name: 'functest-kubernetes-smoke-docker-build-amd64-{stream}'
+ <<: *build-job-settings
publishers:
- 'functest-kubernetes-amd64-recipients'
@@ -107,16 +124,7 @@
builders:
- shell: |
#!/bin/bash -ex
- case "{stream}" in
- "master")
- tag="latest" ;;
- *)
- tag="{stream}" ;;
- esac
- (cd docker && sudo docker build --pull=true --no-cache --force-rm=true \
- -t "$REPO/functest-kubernetes:$tag" .)
- sudo docker push "$REPO/functest-kubernetes:$tag"
- sudo docker rmi "$REPO/functest-kubernetes:$tag"
+ sudo amd64_dirs=docker/{image} bash ./build.sh
exit $?
# parameter macro