summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-01-02 14:08:42 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2019-01-02 14:08:42 +0100
commit62515818796b3b0ef9741ebdef6568cc837b124d (patch)
treeffff27f8b5d4649ef84816c2bd4f3ccaf92771ee /jjb/functest
parentf022b470e2828520e7179001c97dbecb449241c2 (diff)
Leverage on $WORKSPACE in xtesting.yaml
It also forces the right slave when pulling/removing the docker images. Change-Id: I36c4b0d7f046c25d51458ec6dee0da163eb3ee2d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb/functest')
-rw-r--r--jjb/functest/xtesting.yaml10
1 files changed, 6 insertions, 4 deletions
diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml
index 85a008c7d..46568db1a 100644
--- a/jjb/functest/xtesting.yaml
+++ b/jjb/functest/xtesting.yaml
@@ -62,19 +62,19 @@
builders:
- shell: |
set +ex
- rm -rf /var/lib/jenkins/workspace/$JOB_NAME/*
+ [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/* || true
if [ "{port}" = "None" ]; then
image={repo}/{container}:{tag}
else
image={repo}:{port}/{container}:{tag}
fi
sudo docker run --rm \
- -v /var/lib/jenkins/workspace/$JOB_NAME/results:/var/lib/xtesting/results \
+ -v $WORKSPACE/results:/var/lib/xtesting/results \
$image run_tests -t {test}
res=$?
- gsutil -m cp -r /var/lib/jenkins/workspace/$JOB_NAME/ \
+ gsutil -m cp -r $WORKSPACE/ \
gs://artifacts.opnfv.org/xtesting/$JOB_NAME-$BUILD_ID > /dev/null
- find /var/lib/jenkins/workspace/$JOB_NAME/ -type f \
+ find $WORKSPACE -type f \
-printf \
"http://artifacts.opnfv.org/xtesting/$JOB_NAME-$BUILD_ID/%P\n"
exit $res
@@ -112,10 +112,12 @@
name: remove former images
projects:
- name: 'opnfv-xtesting-{tag}-rmi'
+ <<: *xtesting-jobs
- multijob:
name: pull containers
projects:
- name: 'opnfv-xtesting-{tag}-pull'
+ <<: *xtesting-jobs
- multijob:
name: opnfv/xtesting:{tag}
projects: