CLM: Added CLM scanner job template 71/4571/3
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 31 May 2017 23:27:48 +0000 (16:27 -0700)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Tue, 6 Jun 2017 17:14:14 +0000 (10:14 -0700)
This template will be used in jenkins per project to
perform code scans in nexus-iq server

Issue: RELENG-150

Change-Id: I93f7209c752748abcf1314ba3dfd2a1e112dc639
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
jjb/global-macros.yaml
jjb/global-templates-java.yaml

index efc0d09..d69e918 100644 (file)
     builders:
       - shell: !include-raw: include-docker-login.sh
 
+- builder:
+    name: check-clm
+    builders:
+      - sonatype-clm:
+          application-name: '{application-name}'
+
 # PARAMETERS
 - parameter:
     name: infra-parameters
index 3326082..029d98a 100644 (file)
@@ -1,4 +1,70 @@
 ---
+- job-template:
+    # Template used for running CLM scans
+    # Arguements:
+    #   {name}         - Project Shortname
+    #   {project}      - Fully qualified project name
+    #   {mvn-settings} - Project maven settings file
+    #   {jdk}
+    name: '{project-name}-{stream}-clm'
+
+    project-type: freestyle
+    node: '{build-node}'
+    jdk: '{jdk}'
+
+    properties:
+      - infra-properties:
+          build-days-to-keep: '{build-days-to-keep}'
+
+    parameters:
+      - infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+
+    scm:
+      - git-scm:
+          refspec: ''
+          branch: '{branch}'
+
+    wrappers:
+      - infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    triggers:
+      - timed: 'H H * * 6'
+
+    builders:
+      - provide-maven-settings:
+          global-settings-file: 'global-settings'
+          settings-file: '{mvn-settings}'
+      - maven-target:
+          maven-version: 'mvn33'
+          pom: 'pom.xml'
+          goals: |
+              clean install dependency:tree com.sonatype.clm:clm-maven-plugin:index
+              -Pq
+              --show-version
+              --batch-mode
+              -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
+              -Djenkins
+              -Dmaven.repo.local=/tmp/r
+              -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
+          java-opts:
+            - '-Xmx4096m -XX:MaxPermSize=512m'
+          settings: '{mvn-settings}'
+          settings-type: cfp
+          global-settings: 'global-settings'
+          global-settings-type: cfp
+      - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
+      - check-clm:
+          application-name: '{project-name}'
+
+    publishers:
+      - infra-shiplogs:
+          maven-version: '{maven-version}'
+
 - job-template:
     # Job template for Java verify jobs
     #