Make distribution-check job an ODL-releng templated job
[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     jdk: '{jdk}'
13
14     logrotate:
15         daysToKeep: '14'
16         numToKeep: '10'
17         artifactDaysToKeep: '{build-artifact-days-to-keep}'
18         artifactNumToKeep: '{build-artifact-num-to-keep}'
19
20     parameters:
21         - gerrit-project-parameter:
22             project: '{project}'
23         - gerrit-refspec-parameter:
24             refspec: '{branch}'
25         - project-parameter:
26             project: '{project}'
27         - integration-distribution-git-url
28
29     scm:
30         - integration-gerrit-scm:
31             credentials-id: '{ssh-credentials}'
32             basedir: '$GERRIT_PROJECT'
33             refspec: '$GERRIT_REFSPEC'
34             branch: '{branch}'
35         - integration-distribution-scm:
36             credentials-id: '{ssh-credentials}'
37             branch: '{branch}'
38
39     wrappers:
40         - build-timeout
41         - ssh-agent-credentials:
42             users:
43                 - '{ssh-credentials}'
44
45     triggers:
46         - gerrit:
47             server-name: 'OpenDaylight'
48             trigger-on:
49                 - patchset-created-event:
50                     exclude-drafts: 'true'
51                     exclude-trivial-rebase: 'false'
52                     exclude-no-code-change: 'true'
53                 - draft-published-event
54                 - comment-added-contains-event:
55                     comment-contains-value: 'test-distribution'
56             projects:
57               - project-compare-type: 'ANT'
58                 project-pattern: '{name}'
59                 branches:
60                   - branch-compare-type: 'ANT'
61                     branch-pattern: '**/{branch}'
62             skip-vote:
63                 successful: true
64                 failed: true
65                 unstable: true
66                 notbuilt: true
67
68     prebuilders:
69         - integration-get-bundle-url
70         - inject:
71             properties-file: 'bundle.txt'
72         - wipe-org-opendaylight-repo
73         - maven-target:
74             maven-version: '{mvn33}'
75             pom: '$GERRIT_PROJECT/pom.xml'
76             goals: 'clean install -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}'
77             java-opts:
78                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
79             settings: '{JENKINS_SETTINGS}'
80             global-settings: '{odl-global-settings}'
81
82     maven:
83         maven-name: '{mvn33}'
84         root-pom: 'distribution/pom.xml'
85         goals: 'clean install -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
86         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
87         settings: '{JENKINS_SETTINGS}'
88         global-settings: '{odl-global-settings}'
89         ignore-upstream-changes: true
90         post-step-run-condition: 'SUCCESS'
91
92     postbuilders:
93         - trigger-builds:
94             - project: 'integration-distribution-deploy-{stream}'
95               block: true
96               predefined-parameters:
97                   BUNDLEURL=$BUNDLEURL
98
99     publishers:
100         - email-notification:
101             email-prefix: '[PROJECT_SHORTNAME]'