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