jjb: move ssh wrappers to releng-defaults.yaml
[releng.git] / jjb / octopus / octopus.yml
1 ################################
2 # job configuration for Octopus
3 ################################
4 - project:
5     name: octopus
6     jobs:
7         - 'octopus-test'
8         - 'octopus-daily-{stream}'
9         - 'octopus-merge-{stream}'
10         - 'octopus-verify-{stream}'
11
12     # stream:    branch with - in place of / (eg. stable-arno)
13     # branch:    branch (eg. stable/arno)
14     stream:
15         - master:
16             branch: 'master'
17             gs-pathname: ''
18         - stable-arno:
19             branch: 'stable/arno'
20             gs-pathname: '/arno'
21
22     project: 'octopus'
23     somevar: 'foo'
24 ###############################
25 # job templates
26 ###############################
27
28 - job-template:
29     name: octopus-test
30
31     project-type: freestyle
32
33     logrotate:
34         daysToKeep: 30
35         numToKeep: 10
36         artifactDaysToKeep: -1
37         artifactNumToKeep: -1
38
39     builders:
40         - shell: |
41             echo "Hello world from octopus"
42
43 - job-template:
44     name: 'octopus-daily-{stream}'
45
46     node: master
47
48     # Job template for daily builders
49     #
50     # Required Variables:
51     #     stream:    branch with - in place of / (eg. stable)
52     #     branch:    branch (eg. stable)
53
54     project-type: freestyle
55     varsetabove: '{somevar}'
56
57     logrotate:
58         daysToKeep: '{build-days-to-keep}'
59         numToKeep: '{build-num-to-keep}'
60         artifactDaysToKeep: '{build-artifact-days-to-keep}'
61         artifactNumToKeep: '{build-artifact-num-to-keep}'
62
63     parameters:
64         - project-parameter:
65             project: '{project}'
66         - octopus-parameter:
67             gs-pathname: '{gs-pathname}'
68
69     scm:
70         - git-scm:
71             credentials-id: '{ssh-credentials}'
72             refspec: ''
73             branch: '{branch}'
74
75     triggers:
76         - 'octopus-{stream}'
77
78     prebuilders:
79         - test-macro
80
81     builders:
82         - shell:
83             !include-raw ../opnfvdocs/docu-build.sh
84
85     postbuilders:
86         - test-macro
87
88 - job-template:
89     name: 'octopus-verify-{stream}'
90
91     node: master
92
93     project-type: freestyle
94
95     logrotate:
96         daysToKeep: 30
97         numToKeep: 10
98         artifactDaysToKeep: -1
99         artifactNumToKeep: -1
100
101     parameters:
102         - project-parameter:
103             project: '{project}'
104         - gerrit-parameter:
105             branch: '{branch}'
106     scm:
107         - gerrit-trigger-scm:
108             credentials-id: '{ssh-credentials}'
109             refspec: '$GERRIT_REFSPEC'
110             choosing-strategy: 'gerrit'
111
112     triggers:
113         - gerrit:
114             trigger-on:
115                 - patchset-created-event:
116                     exclude-drafts: 'false'
117                     exclude-trivial-rebase: 'false'
118                     exclude-no-code-change: 'false'
119                 - draft-published-event
120                 - comment-added-contains-event:
121                     comment-contains-value: 'recheck'
122                 - comment-added-contains-event:
123                     comment-contains-value: 'reverify'
124             projects:
125               - project-compare-type: 'ANT'
126                 project-pattern: 'octopus'
127                 branches:
128                   - branch-compare-type: 'ANT'
129                     branch-pattern: '**/{branch}'
130
131     builders:
132         - shell:
133             !include-raw ../opnfvdocs/docu-build.sh
134
135 - job-template:
136     name: 'octopus-merge-{stream}'
137
138     node: master
139
140     # builder-merge job to run JJB update
141     #
142     # This job's purpose is to update all the JJB
143
144     project-type: freestyle
145
146     logrotate:
147         daysToKeep: 30
148         numToKeep: 40
149         artifactDaysToKeep: -1
150         artifactNumToKeep: 5
151
152     parameters:
153         - project-parameter:
154             project: '{project}'
155         - gerrit-parameter:
156             branch: '{branch}'
157
158     scm:
159         - gerrit-trigger-scm:
160             credentials-id: '{ssh-credentials}'
161             refspec: ''
162             choosing-strategy: 'default'
163
164
165     triggers:
166         - gerrit:
167             trigger-on:
168                 - change-merged-event
169                 - comment-added-contains-event:
170                     comment-contains-value: 'remerge'
171             projects:
172               - project-compare-type: 'ANT'
173                 project-pattern: 'octopus'
174                 branches:
175                     - branch-compare-type: 'ANT'
176                       branch-pattern: '**/{branch}'
177
178     builders:
179         - shell:
180             !include-raw ../opnfvdocs/docu-build.sh
181
182
183 ########################
184 ## parameter macros
185 #########################
186 - parameter:
187     name: octopus-parameter
188     parameters:
189         - string:
190             name: GS_PATHNAME
191             default: '{gs-pathname}'
192             description: "Version directory where the octopus will be stored in gs repository"
193
194 #########################
195 ## trigger macros
196 #########################
197 - trigger:
198     name: 'octopus-master'
199     triggers:
200         - pollscm: "H 7 * * *"
201
202 - trigger:
203     name: 'octopus-stable-arno'
204     triggers:
205         - pollscm: "H 19 * * *"