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