08b9822184b1d6096a950fed34f8f6ea5a61c8a5
[releng/builder.git] / jjb-templates / distribution-check.yaml
1 # Template: integration-patch-distribution-{stream}
2 # Goal: Build a patch and make sure the distribution can deploy with this change
3 # Operation: This job template builds a patch, creates a distribution containing
4 #            the patch, and triggers the distribution deploy test
5
6 - job-template:
7     name: 'PROJECT_SHORTNAME-distribution-check-{stream}'
8     disabled: '{obj:disable_distribution_check}'
9
10     project-type: maven
11     node: dynamic_verify
12     concurrent: true
13     jdk: '{jdk}'
14
15     logrotate:
16         daysToKeep: '{build-days-to-keep}'
17         numToKeep: '{build-num-to-keep}'
18         artifactDaysToKeep: '{build-artifact-days-to-keep}'
19         artifactNumToKeep: '{build-artifact-num-to-keep}'
20
21     parameters:
22         - gerrit-parameters:
23             project: '{project}'
24             branch: '{branch}'
25             refspec: 'refs/heads/{branch}'
26         - project-parameter:
27             project: '{project}'
28         - integration-distribution-git-url
29
30     scm:
31         - integration-gerrit-scm:
32             credentials-id: '{ssh-credentials}'
33             basedir: '$GERRIT_PROJECT'
34             refspec: '$GERRIT_REFSPEC'
35             branch: '{branch}'
36         - integration-distribution-scm:
37             credentials-id: '{ssh-credentials}'
38             branch: '{branch}'
39
40     wrappers:
41         - build-timeout
42         - ssh-agent-credentials:
43             users:
44                 - '{ssh-credentials}'
45
46     triggers:
47         - gerrit:
48             server-name: 'OpenDaylight'
49             trigger-on:
50                 - patchset-created-event:
51                     exclude-drafts: 'true'
52                     exclude-trivial-rebase: 'false'
53                     exclude-no-code-change: 'true'
54                 - draft-published-event
55                 - comment-added-contains-event:
56                     comment-contains-value: 'test-distribution'
57                 - comment-added-contains-event:
58                     comment-contains-value: 'reverify'
59                 - comment-added-contains-event:
60                     comment-contains-value: 'recheck'
61             projects:
62               - project-compare-type: 'ANT'
63                 project-pattern: '{name}'
64                 branches:
65                   - branch-compare-type: 'ANT'
66                     branch-pattern: '**/{branch}'
67             skip-vote:
68                 successful: false
69                 failed: false
70                 unstable: false
71                 notbuilt: false
72
73     prebuilders:
74         - maven-target:
75             maven-version: '{mvn33}'
76             pom: '$GERRIT_PROJECT/pom.xml'
77             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}'
78             java-opts:
79                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
80             settings: 'JENKINS_SETTINGS'
81             settings-type: cfp
82             global-settings: 'odl-global-settings'
83             global-settings-type: cfp
84
85     maven:
86         maven-name: '{mvn33}'
87         root-pom: 'distribution/pom.xml'
88         goals: 'clean install -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
89         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
90         settings: 'JENKINS_SETTINGS'
91         settings-type: cfp
92         global-settings: 'odl-global-settings'
93         global-settings-type: cfp
94         ignore-upstream-changes: true
95         post-step-run-condition: 'SUCCESS'
96
97     postbuilders:
98         - integration-distribution-check
99
100     publishers:
101         - archive:
102             artifacts: 'karaf.log'
103         - archive:
104             artifacts: 'karaf_console.log'
105         - email-notification:
106             email-prefix: '[PROJECT_SHORTNAME]'
107         - archive-build:
108             maven-version: '{mvn33}'