Store screenshots as artifacts
Change-Id: Ib91c94fffacf6b14c28bab2fe226f96a6fd13c15
diff --git a/test-nodejs-pipeline.groovy b/test-nodejs-pipeline.groovy
index b1024cc..0c6e46e 100644
--- a/test-nodejs-pipeline.groovy
+++ b/test-nodejs-pipeline.groovy
@@ -89,6 +89,14 @@
throw err
} finally {
common.sendNotification(currentBuild.result, "" ,["slack"])
+ stage('Attach artifacts') {
+ if (containerName != null) {
+ sh("docker cp ${containerName}:/opt/workspace/test_output ${workspace}/test_output")
+ archiveArtifacts(
+ artifacts: "${workspace}/test_output/screenshots/*.png",
+ )
+ }
+ }
stage('Cleanup') {
if (containerName != null) {
dockerCleanupCommands = ['stop', 'rm -f']