Add CLM job type 17/16517/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sat, 14 Mar 2015 17:49:23 +0000 (13:49 -0400)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 23 Apr 2015 21:43:00 +0000 (21:43 +0000)
Depends on Sonatype CLM support first being added to JJB upstream.
See: https://review.openstack.org/164446/

Change-Id: Ib97955207bddc104dd92c2c92a21c6c43fbe2ad4
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb-templates/clm.yaml [new file with mode: 0644]
jjb/releng-macros.yaml
scripts/jjb-init-project.py

diff --git a/jjb-templates/clm.yaml b/jjb-templates/clm.yaml
new file mode 100644 (file)
index 0000000..22e253d
--- /dev/null
@@ -0,0 +1,49 @@
+- job-template:
+    name: 'PROJECT-clm'
+
+    project-type: maven
+    node: dynamic_verify
+    jdk: '{jdk}'
+
+    logrotate:
+        daysToKeep: '{build-days-to-keep}'
+        numToKeep: '{build-num-to-keep}'
+        artifactDaysToKeep: '{build-artifact-days-to-keep}'
+        artifactNumToKeep: '{build-artifact-num-to-keep}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: 'master'
+
+    wrappers:
+        - build-timeout
+        - ssh-agent-credentials:
+            user: '{ssh-credentials}'
+
+    triggers:
+        - timed: '@weekly'
+
+    prebuilders:
+        - wipe-org-opendaylight-repo
+
+    maven:
+        maven-name: '{mvn32}'
+        root-pom: 'pom.xml'
+        goals: 'com.sonatype.clm:clm-maven-plugin:index -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
+        maven-opts: '-Xmx4096m -XX:MaxPermSize=512m'
+        settings: '{PROJECT-settings}'
+        global-settings: '{odl-global-settings}'
+
+    postbuilders:
+        - check-clm:
+            application-name: PROJECT
+
+    publishers:
+        - email-notification:
+            email-prefix: '[PROJECT]'
index e909bdb574dfa045f79ddb58db22e01b43f09f2c..516ceb05f11710586ea7518aa462dc8abe5889ad 100644 (file)
     name: jacoco-nojava-workaround
     builders:
         - shell: 'mkdir -p $WORKSPACE/target/classes'
+
+- builder:
+    name: check-clm
+    builders:
+        - sonatype-clm:
+            application-name: '{application-name}'
+            scan-targets: '**/target/**'
index 1c12e8ef79cd6739ca5a817538c7a823aaa594db..391ba72eba89a148803ef8a21e161ee19336e595 100644 (file)
@@ -75,6 +75,7 @@ if not templates:
 else:
     make_cfg = True
     cfg_string.append("JOB_TEMPLATES: %s" % templates)
+templates += ",clm"  # ensure we always create a clm job for all projects
 
 if not branches:
     branches = "master,stable/helium"
@@ -178,7 +179,7 @@ job_templates_yaml = ""
 for t in use_templates:
     if t == "project":  # This is not a job type but is used for templating
         pass
-    elif t == "sonar":
+    elif t == "sonar" or t == "clm":
         job_templates_yaml = job_templates_yaml + \
             "        - '%s-%s'\n" % (project, t)
     else: