From 62515818796b3b0ef9741ebdef6568cc837b124d Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 2 Jan 2019 14:08:42 +0100 Subject: Leverage on $WORKSPACE in xtesting.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It also forces the right slave when pulling/removing the docker images. Change-Id: I36c4b0d7f046c25d51458ec6dee0da163eb3ee2d Signed-off-by: Cédric Ollivier --- jjb/functest/xtesting.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'jjb/functest') 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: -- cgit 1.2.3-korg