Rename jenkins ssh-agent-credential
[releng/builder.git] / jjb / releng-macros.yaml
index 4bc59d742030f23eb9a0ee5b98374cbd446c49ae..e98d8e3cd30c3c8f498e36d7f72e1fc2bc48d38b 100644 (file)
@@ -76,7 +76,7 @@
     name: git-scm
     scm:
         - git:
-            credentials-id: '{credentials-id}'
+            credentials-id: 'opendaylight-jenkins-ssh'
             url: '$GIT_BASE'
             refspec: ''
             branches:
@@ -88,7 +88,7 @@
     name: git-scm-with-submodules
     scm:
         - git:
-            credentials-id: '{credentials-id}'
+            credentials-id: 'opendaylight-jenkins-ssh'
             url: '$GIT_BASE'
             refspec: ''
             branches:
     name: gerrit-trigger-scm
     scm:
         - git:
-            credentials-id: '{credentials-id}'
+            credentials-id: 'opendaylight-jenkins-ssh'
             url: '$GIT_BASE'
             refspec: '{refspec}'
             branches:
             unstable: true
             fixed: true
             send-to:
-                - developers
                 - recipients
 
 - publisher:
     # 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:
                         global-settings-type: cfp
                 - description-setter:
                     regexp: '^Build logs: .*'
+                # Cleanup after ourselves
+                - wipe-org-opendaylight-repo
             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
     name: releng-stage-release
     builders:
         - shell: !include-raw: include-raw-stage-release.sh
+
+- wrapper:
+    # This wrapper is required for all jobs as it configures the wrappers
+    # needed by OpenDaylight infra.
+    name: opendaylight-infra-wrappers
+    wrappers:
+        - timeout:
+            type: absolute
+            timeout: '{build-timeout}'
+            timeout-var: 'BUILD_TIMEOUT'
+            fail: true
+        - ssh-agent-credentials:
+            users:
+                - 'opendaylight-jenkins-ssh'
+        - openstack:
+            single-use: True