Cleanup workspace at end of build
[releng/builder.git] / jjb / releng-macros.yaml
index d5e9cc6be7c97a2a1918464a5ba729864025f35f..90e755d15d8e870625917ae2cd5645e08cc557d6 100644 (file)
                       healthy: 50
                       unhealthy: 40
 
+- publisher:
+    name: archive-build
+    # To archive things the job will need to create a "archives" directory in
+    # the workspace and this macro will handle copying the contents of the
+    # archives directory.
+    # Also ensure that the workspace is cleaned up at the end of the build.
+    publishers:
+        - postbuildscript:
+            builders:
+                - shell: !include-raw: include-raw-deploy-archives.sh
+                - maven-target:
+                        maven-version: '{maven-version}'
+                        pom: '.archives/deploy-archives.xml'
+                        goals: 'clean deploy -V -B -q -Dmaven.repo.local=/tmp/r'
+                        settings: 'jenkins-log-archives-settings'
+                        settings-type: cfp
+                        global-settings: 'odl-global-settings'
+                        global-settings-type: cfp
+                - description-setter:
+                    regexp: '^Build logs: .*'
+            script-only-if-succeeded: False
+            script-only-if-failed: False
+            mark-unstable-if-failed: True
+        - workspace-cleanup:
+            fail-build: false
+
 - builder:
     name: wipe-org-opendaylight-repo
     builders: