Split maven-deploy into a macro
[releng/global-jjb.git] / jjb / lf-maven-jobs.yaml
index 9294650..d290115 100644 (file)
       - github-maven-javadoc-publish
       - github-maven-javadoc-verify
 
+##########
+# Macros #
+##########
+
+- builder:
+    name: lf-maven-deploy
+    builders:
+      - shell: !include-raw:
+          - ../shell/common-variables.sh
+          - ../shell/maven-deploy.sh
+
 ####################
 # COMMON FUNCTIONS #
 ####################
 - lf_maven_common: &lf_maven_common
     name: lf-maven-common
 
+    ######################
+    # Default parameters #
+    ######################
+
+    archive-artifacts: >
+      **/*.log
+      **/hs_err_*.log
+      **/target/**/feature.xml
+      **/target/failsafe-reports/failsafe-summary.xml
+      **/target/surefire-reports/*-output.txt
+
+    #####################
+    # Job Configuration #
+    #####################
+
     project-type: freestyle
     node: '{build-node}'
     jdk: '{java-version}'
     # Default parameters #
     ######################
 
-    archive-artifacts: ''
     branch: master
     build-days-to-keep: 30  # 30 days for troubleshooting purposes
     build-timeout: 30
     # Default parameters #
     ######################
 
-    archive-artifacts: ''
     branch: master
     build-days-to-keep: 30  # 30 days in case a release takes long to get approved.
     build-timeout: 30
     # Default parameters #
     ######################
 
-    archive-artifacts: ''
     branch: master
     build-days-to-keep: 30  # 30 days in case a release takes long to get approved.
     build-timeout: 30
     # Default parameters #
     ######################
 
-    archive-artifacts: ''
     branch: master
     build-days-to-keep: 30  # 30 days in case we need to troubleshoot
     build-timeout: 30
           - ../shell/common-variables.sh
           - ../shell/maven-fetch-metadata.sh
           - ../shell/maven-build.sh
-          - ../shell/maven-deploy.sh
+      - lf-maven-deploy
       - lf-provide-maven-settings-cleanup
 
     publishers:
     # Default parameters #
     ######################
 
-    archive-artifacts: ''
     branch: master
     build-days-to-keep: 30  # 30 days in case a release takes long to get approved.
     build-timeout: 30
     # Default parameters #
     ######################
 
-    archive-artifacts: ''
     branch: master  # Sonar should always be run on master branch
     build-days-to-keep: 7
     build-timeout: 30
     # Default parameters #
     ######################
 
-    archive-artifacts: ''
     branch: master
     build-days-to-keep: 7
     build-timeout: 60
     # Default parameters #
     ######################
 
-    archive-artifacts: ''
     branch: master
     build-days-to-keep: 7
     build-timeout: 60