Convert distribution-check to regular jjb template
[releng/builder.git] / jjb / releng-templates-java.yaml
1 - job-template:
2     # Template used for running CLM scans
3     # Arguements:
4     #   {name}         - Project Shortname
5     #   {project}      - Fully qualified project name
6     #   {mvn-settings} - Project maven settings file
7     #   {stream}
8     #   {jdk}
9     name: '{name}-clm-{stream}'
10
11     project-type: maven
12     node: dynamic_verify
13     jdk: '{jdk}'
14
15     logrotate:
16         daysToKeep: '{build-days-to-keep}'
17         numToKeep: '{build-num-to-keep}'
18
19     parameters:
20         - project-parameter:
21             project: '{project}'
22
23     scm:
24         - git-scm:
25             refspec: ''
26             branch: '{branch}'
27
28     wrappers:
29         - opendaylight-infra-wrappers:
30             build-timeout: '{build-timeout}'
31
32     triggers:
33         - timed: 'H H * * 6'
34
35     prebuilders:
36         - provide-maven-settings:
37             global-settings-file: 'odl-global-settings'
38             settings-file: '{mvn-settings}'
39
40     maven:
41         maven-name: '{mvn33}'
42         root-pom: 'pom.xml'
43         goals: 'clean install com.sonatype.clm:clm-maven-plugin:index -V -B -Djenkins -DskipTests=true -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
44         maven-opts: '-Xmx4096m -XX:MaxPermSize=512m'
45         settings: '{mvn-settings}'
46         settings-type: cfp
47         global-settings: 'odl-global-settings'
48         global-settings-type: cfp
49
50     postbuilders:
51         - shell: 'find . -regex ".*karaf/target" | xargs rm -rf'
52         - check-clm:
53             application-name: '{name}'
54
55     publishers:
56         - email-notification:
57             email-prefix: '[{name}]'
58         - archive-build:
59             maven-version: '{mvn33}'
60
61 # Template: integration-patch-distribution-{stream}
62 # Goal: Build a patch and make sure the distribution can deploy with this change
63 # Operation: This job template builds a patch, creates a distribution containing
64 #            the patch, and triggers the distribution deploy test
65
66 - job-template:
67     name: '{name}-distribution-check-{stream}'
68     disabled: '{obj:disable_distribution_check}'
69
70     project-type: maven
71     node: dynamic_verify
72     concurrent: true
73     jdk: '{jdk}'
74
75     logrotate:
76         daysToKeep: '{build-days-to-keep}'
77         numToKeep: '{build-num-to-keep}'
78         artifactDaysToKeep: '{build-artifact-days-to-keep}'
79         artifactNumToKeep: '{build-artifact-num-to-keep}'
80
81     parameters:
82         - gerrit-parameters:
83             project: '{project}'
84             branch: '{branch}'
85             refspec: 'refs/heads/{branch}'
86         - project-parameter:
87             project: '{project}'
88         - integration-distribution-git-url
89
90     scm:
91         - integration-gerrit-scm:
92             basedir: '$GERRIT_PROJECT'
93             refspec: '$GERRIT_REFSPEC'
94             branch: '{branch}'
95         - integration-distribution-scm:
96             branch: '{branch}'
97
98     wrappers:
99         - opendaylight-infra-wrappers:
100             build-timeout: '{build-timeout}'
101
102     triggers:
103         - gerrit:
104             server-name: 'OpenDaylight'
105             trigger-on:
106                 - patchset-created-event:
107                     exclude-drafts: 'true'
108                     exclude-trivial-rebase: 'false'
109                     exclude-no-code-change: 'true'
110                 - draft-published-event
111                 - comment-added-contains-event:
112                     comment-contains-value: 'test-distribution'
113                 - comment-added-contains-event:
114                     comment-contains-value: 'reverify'
115                 - comment-added-contains-event:
116                     comment-contains-value: 'recheck'
117             projects:
118               - project-compare-type: 'ANT'
119                 project-pattern: '{name}'
120                 branches:
121                   - branch-compare-type: 'ANT'
122                     branch-pattern: '**/{branch}'
123             skip-vote:
124                 successful: false
125                 failed: false
126                 unstable: false
127                 notbuilt: false
128
129     prebuilders:
130         - maven-target:
131             maven-version: '{mvn33}'
132             pom: '$GERRIT_PROJECT/pom.xml'
133             goals: 'clean install -V -B -Djenkins -DskipTests -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true -Dmaven.site.skip=true -DgenerateReports=false -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -Dstream={stream}'
134             java-opts:
135                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
136             settings: '{mvn-settings}'
137             settings-type: cfp
138             global-settings: 'odl-global-settings'
139             global-settings-type: cfp
140
141     maven:
142         maven-name: '{mvn33}'
143         root-pom: 'distribution/pom.xml'
144         goals: 'clean install -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
145         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
146         settings: '{mvn-settings}'
147         settings-type: cfp
148         global-settings: 'odl-global-settings'
149         global-settings-type: cfp
150         ignore-upstream-changes: true
151         post-step-run-condition: 'SUCCESS'
152
153     postbuilders:
154         - integration-distribution-check
155
156     publishers:
157         - email-notification:
158             email-prefix: '[{name}]'
159         - postbuildscript:
160             builders:
161                 - shell: |
162                     #!/bin/bash
163                     mkdir -p $WORKSPACE/archives
164                     cp karaf*.log $WORKSPACE/archives
165             script-only-if-succeeded: False
166             script-only-if-failed: False
167             mark-unstable-if-failed: True
168         - archive-build:
169             maven-version: '{mvn33}'