jjb: add default logrotate 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     logrotate:
32         daysToKeep: 30
33         numToKeep: 10
34         artifactDaysToKeep: -1
35         artifactNumToKeep: -1
36
37     builders:
38         - shell: |
39             echo "Hello world from octopus"
40
41 - job-template:
42     name: 'octopus-daily-{stream}'
43
44     # Job template for daily builders
45     #
46     # Required Variables:
47     #     stream:    branch with - in place of / (eg. stable)
48     #     branch:    branch (eg. stable)
49
50     varsetabove: '{somevar}'
51
52     parameters:
53         - project-parameter:
54             project: '{project}'
55         - octopus-parameter:
56             gs-pathname: '{gs-pathname}'
57
58     scm:
59         - git-scm:
60             credentials-id: '{ssh-credentials}'
61             refspec: ''
62             branch: '{branch}'
63
64     triggers:
65         - 'octopus-{stream}'
66
67     prebuilders:
68         - test-macro
69
70     builders:
71         - shell:
72             !include-raw ../opnfvdocs/docu-build.sh
73
74     postbuilders:
75         - test-macro
76
77 - job-template:
78     name: 'octopus-verify-{stream}'
79
80     logrotate:
81         daysToKeep: 30
82         numToKeep: 10
83         artifactDaysToKeep: -1
84         artifactNumToKeep: -1
85
86     parameters:
87         - project-parameter:
88             project: '{project}'
89         - gerrit-parameter:
90             branch: '{branch}'
91     scm:
92         - gerrit-trigger-scm:
93             credentials-id: '{ssh-credentials}'
94             refspec: '$GERRIT_REFSPEC'
95             choosing-strategy: 'gerrit'
96
97     triggers:
98         - gerrit:
99             trigger-on:
100                 - patchset-created-event:
101                     exclude-drafts: 'false'
102                     exclude-trivial-rebase: 'false'
103                     exclude-no-code-change: 'false'
104                 - draft-published-event
105                 - comment-added-contains-event:
106                     comment-contains-value: 'recheck'
107                 - comment-added-contains-event:
108                     comment-contains-value: 'reverify'
109             projects:
110               - project-compare-type: 'ANT'
111                 project-pattern: 'octopus'
112                 branches:
113                   - branch-compare-type: 'ANT'
114                     branch-pattern: '**/{branch}'
115
116     builders:
117         - shell:
118             !include-raw ../opnfvdocs/docu-build.sh
119
120 - job-template:
121     name: 'octopus-merge-{stream}'
122
123     # builder-merge job to run JJB update
124     #
125     # This job's purpose is to update all the JJB
126
127     parameters:
128         - project-parameter:
129             project: '{project}'
130         - gerrit-parameter:
131             branch: '{branch}'
132
133     scm:
134         - gerrit-trigger-scm:
135             credentials-id: '{ssh-credentials}'
136             refspec: ''
137             choosing-strategy: 'default'
138
139     triggers:
140         - gerrit:
141             trigger-on:
142                 - change-merged-event
143                 - comment-added-contains-event:
144                     comment-contains-value: 'remerge'
145             projects:
146               - project-compare-type: 'ANT'
147                 project-pattern: 'octopus'
148                 branches:
149                     - branch-compare-type: 'ANT'
150                       branch-pattern: '**/{branch}'
151
152     builders:
153         - shell:
154             !include-raw ../opnfvdocs/docu-build.sh
155
156 ########################
157 ## parameter macros
158 #########################
159 - parameter:
160     name: octopus-parameter
161     parameters:
162         - string:
163             name: GS_PATHNAME
164             default: '{gs-pathname}'
165             description: "Version directory where the octopus will be stored in gs repository"
166
167 #########################
168 ## trigger macros
169 #########################
170 - trigger:
171     name: 'octopus-master'
172     triggers:
173         - pollscm: "H 7 * * *"
174
175 - trigger:
176     name: 'octopus-stable-arno'
177     triggers:
178         - pollscm: "H 19 * * *"