Migrate docs-rtd to archive-builds macro
[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             basedir: '$GERRIT_PROJECT'
33             refspec: '$GERRIT_REFSPEC'
34             branch: '{branch}'
35         - integration-distribution-scm:
36             branch: '{branch}'
37
38     wrappers:
39         - opendaylight-infra-wrappers:
40             build-timeout: '{build-timeout}'
41
42     triggers:
43         - gerrit:
44             server-name: 'OpenDaylight'
45             trigger-on:
46                 - patchset-created-event:
47                     exclude-drafts: 'true'
48                     exclude-trivial-rebase: 'false'
49                     exclude-no-code-change: 'true'
50                 - draft-published-event
51                 - comment-added-contains-event:
52                     comment-contains-value: 'test-distribution'
53                 - comment-added-contains-event:
54                     comment-contains-value: 'reverify'
55                 - comment-added-contains-event:
56                     comment-contains-value: 'recheck'
57             projects:
58               - project-compare-type: 'ANT'
59                 project-pattern: '{name}'
60                 branches:
61                   - branch-compare-type: 'ANT'
62                     branch-pattern: '**/{branch}'
63             skip-vote:
64                 successful: false
65                 failed: false
66                 unstable: false
67                 notbuilt: false
68
69     prebuilders:
70         - maven-target:
71             maven-version: '{mvn33}'
72             pom: '$GERRIT_PROJECT/pom.xml'
73             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}'
74             java-opts:
75                 - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
76             settings: 'JENKINS_SETTINGS'
77             settings-type: cfp
78             global-settings: 'odl-global-settings'
79             global-settings-type: cfp
80
81     maven:
82         maven-name: '{mvn33}'
83         root-pom: 'distribution/pom.xml'
84         goals: 'clean install -V -B -Djenkins -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
85         maven-opts: '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
86         settings: 'JENKINS_SETTINGS'
87         settings-type: cfp
88         global-settings: 'odl-global-settings'
89         global-settings-type: cfp
90         ignore-upstream-changes: true
91         post-step-run-condition: 'SUCCESS'
92
93     postbuilders:
94         - integration-distribution-check
95
96     publishers:
97         - email-notification:
98             email-prefix: '[PROJECT_SHORTNAME]'
99         - postbuildscript:
100             builders:
101                 - shell: |
102                     #!/bin/bash
103                     mkdir -p $WORKSPACE/archives
104                     cp karaf*.log $WORKSPACE/archives
105             script-only-if-succeeded: False
106             script-only-if-failed: False
107             mark-unstable-if-failed: True
108         - archive-build:
109             maven-version: '{mvn33}'