Convert templates to be single-use minions
[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         - openstack:
46             single-use: true
47
48     triggers:
49         - gerrit:
50             server-name: 'OpenDaylight'
51             trigger-on:
52                 - patchset-created-event:
53                     exclude-drafts: 'true'
54                     exclude-trivial-rebase: 'false'
55                     exclude-no-code-change: 'true'
56                 - draft-published-event
57                 - comment-added-contains-event:
58                     comment-contains-value: 'test-distribution'
59                 - comment-added-contains-event:
60                     comment-contains-value: 'reverify'
61                 - comment-added-contains-event:
62                     comment-contains-value: 'recheck'
63             projects:
64               - project-compare-type: 'ANT'
65                 project-pattern: '{name}'
66                 branches:
67                   - branch-compare-type: 'ANT'
68                     branch-pattern: '**/{branch}'
69             skip-vote:
70                 successful: false
71                 failed: false
72                 unstable: false
73                 notbuilt: false
74
75     prebuilders:
76         - maven-target:
77             maven-version: '{mvn33}'
78             pom: '$GERRIT_PROJECT/pom.xml'
79             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}'
80             java-opts:
81                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
82             settings: 'JENKINS_SETTINGS'
83             settings-type: cfp
84             global-settings: 'odl-global-settings'
85             global-settings-type: cfp
86
87     maven:
88         maven-name: '{mvn33}'
89         root-pom: 'distribution/pom.xml'
90         goals: 'clean install -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
91         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
92         settings: 'JENKINS_SETTINGS'
93         settings-type: cfp
94         global-settings: 'odl-global-settings'
95         global-settings-type: cfp
96         ignore-upstream-changes: true
97         post-step-run-condition: 'SUCCESS'
98
99     postbuilders:
100         - integration-distribution-check
101
102     publishers:
103         - archive:
104             artifacts: 'karaf.log'
105         - archive:
106             artifacts: 'karaf_console.log'
107         - email-notification:
108             email-prefix: '[PROJECT_SHORTNAME]'
109         - archive-build:
110             maven-version: '{mvn33}'