From 83e7de55aad9a8f242fff441366be660725c25fc Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 10 Aug 2019 22:58:17 +0200 Subject: [PATCH] Jenkinsfile: save docker-py artifacts Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 8b6da9d82f9609c7c3329caa67778edf61933600) Signed-off-by: Sebastiaan van Stijn --- Jenkinsfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 9d73d8173e..eb52655a3c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -83,6 +83,23 @@ pipeline { post { always { junit testResults: 'bundles/test-docker-py/junit-report.xml', allowEmptyResults: true + + sh ''' + echo "Ensuring container killed." + docker rm -vf docker-pr$BUILD_NUMBER || true + ''' + + sh ''' + echo 'Chowning /workspace to jenkins user' + docker run --rm -v "$WORKSPACE:/workspace" busybox chown -R "$(id -u):$(id -g)" /workspace + ''' + + sh ''' + echo 'Creating docker-py-bundles.tar.gz' + tar -czf docker-py-bundles.tar.gz bundles/test-docker-py/*.xml bundles/test-docker-py/*.log + ''' + + archiveArtifacts artifacts: 'docker-py-bundles.tar.gz' } } }