Save generated tarball from cookiecutter

Change-Id: I8e19ec669514aea78e4f6f7a15c7d10cc44adcfb
diff --git a/test-cookiecutter-reclass.groovy b/test-cookiecutter-reclass.groovy
index f7960c8..fa98b9a 100644
--- a/test-cookiecutter-reclass.groovy
+++ b/test-cookiecutter-reclass.groovy
@@ -120,6 +120,11 @@
                 }
             }
 
+            dir("${env.WORKSPACE}") {
+                sh(returnStatus: true, script: "tar -zcvf model.tar.gz -C model .")
+                archiveArtifacts artifacts: "model.tar.gz"
+            }
+
             stage("test-nodes") {
                 def partitions = common.partitionList(contextFileList, PARALLEL_NODE_GROUP_SIZE.toInteger())
                 def buildSteps = [:]
@@ -135,13 +140,14 @@
                 common.serial(buildSteps)
             }
 
+            stage ('Clean workspace directories') {
+                sh(returnStatus: true, script: "rm -rfv * > /dev/null || true")
+            }
+
         } catch (Throwable e) {
              currentBuild.result = "FAILURE"
              throw e
         } finally {
-            stage ('Clean workspace directories') {
-                sh(returnStatus: true, script: "rm -rfv * > /dev/null || true")
-            }
             common.sendNotification(currentBuild.result,"",["slack"])
         }
     }