docs: make center docs uploaded to the artifact server
[releng.git] / jjb / opnfvdocs / opnfvdocs.yml
1 ########################
2 # Job configuration for opnfvdocs
3 ########################
4 - project:
5
6     name: opnfvdocs
7
8     project: '{name}'
9
10     jobs:
11         - 'opnfvdocs-verify-{stream}'
12         - 'opnfvdocs-merge-{stream}'
13         - 'opnfvdocs-daily-{stream}'
14
15     stream:
16         - master:
17             branch: '{stream}'
18             gs-pathname: ''
19         - brahmaputra:
20             branch: 'stable/{stream}'
21             gs-pathname: '/{stream}'
22
23 ########################
24 # job templates
25 ########################
26
27 - job-template:
28     name: 'opnfvdocs-verify-{stream}'
29
30     parameters:
31         - project-parameter:
32             project: $GERRIT_PROJECT
33         - gerrit-parameter:
34             branch: '{branch}'
35         - string:
36             name: GIT_CLONE_BASE
37             default: ssh://gerrit.opnfv.org:29418
38             description: "Used for overriding the GIT URL coming from parameters macro."
39
40     scm:
41         - gerrit-trigger-scm:
42             credentials-id: '{ssh-credentials}'
43             refspec: '$GERRIT_REFSPEC'
44             choosing-strategy: 'gerrit'
45
46     triggers:
47         - gerrit:
48             trigger-on:
49                 - patchset-created-event:
50                     exclude-drafts: 'false'
51                     exclude-trivial-rebase: 'false'
52                     exclude-no-code-change: 'false'
53                 - draft-published-event
54                 - comment-added-contains-event:
55                     comment-contains-value: 'recheck'
56                 - comment-added-contains-event:
57                     comment-contains-value: 'reverify'
58             projects:
59               - project-compare-type: 'REG_EXP'
60                 project-pattern: '{project}'
61                 branches:
62                   - branch-compare-type: 'ANT'
63                     branch-pattern: '**/{branch}'
64                 file-paths:
65                   - compare-type: ANT
66                     pattern: 'docs/**'
67
68     builders:
69         - build-opnfv-composite-docs
70         - upload-under-review-docs-to-opnfv-artifacts
71         - report-docs-build-result-to-gerrit
72
73 - job-template:
74     name: 'opnfvdocs-merge-{stream}'
75
76     parameters:
77         - project-parameter:
78             project: $GERRIT_PROJECT
79         - gerrit-parameter:
80             branch: '{branch}'
81         - string:
82             name: GIT_CLONE_BASE
83             default: ssh://gerrit.opnfv.org:29418
84             description: "Used for overriding the GIT URL coming from parameters macro."
85         - string:
86             name: GS_URL
87             default: '$GS_BASE{gs-pathname}'
88             description: "Directory where the build artifact will be located upon the completion of the build."
89
90     scm:
91         - gerrit-trigger-scm:
92             credentials-id: '{ssh-credentials}'
93             refspec: '$GERRIT_REFSPEC'
94             choosing-strategy: 'gerrit'
95
96     triggers:
97         - gerrit:
98             trigger-on:
99                 - change-merged-event
100                 - comment-added-contains-event:
101                     comment-contains-value: 'remerge'
102             projects:
103               - project-compare-type: 'REG_EXP'
104                 project-pattern: '{project}'
105                 branches:
106                   - branch-compare-type: 'ANT'
107                     branch-pattern: '**/{branch}'
108                 file-paths:
109                   - compare-type: ANT
110                     pattern: 'docs/**'
111
112     builders:
113         - build-opnfv-composite-docs
114         - upload-generated-docs-to-opnfv-artifacts
115         - report-docs-build-result-to-gerrit
116         - remove-old-docs-from-opnfv-artifacts
117
118 - job-template:
119     name: 'opnfvdocs-daily-{stream}'
120
121     disabled: true
122
123     parameters:
124         - project-parameter:
125             project: '{project}'
126         - string:
127             name: GS_URL
128             default: '$GS_BASE{gs-pathname}'
129             description: "Directory where the build artifact will be located upon the completion of the build."
130         - string:
131             name: GIT_CLONE_BASE
132             default: ssh://gerrit.opnfv.org:29418
133             description: "Used for overriding the GIT URL coming from parameters macro."
134         - string:
135             name: GERRIT_BRANCH
136             default: '{branch}'
137             description: 'Specify the branch in this way in order to be able to use build-opnfv-composite-docs builder.'
138
139     scm:
140         - git-scm:
141             credentials-id: '{ssh-credentials}'
142             refspec: ''
143             branch: '{branch}'
144
145     triggers:
146         - timed: '0 H/6 * * *'
147
148     builders:
149         - build-opnfv-composite-docs
150 #        - upload-generated-docs-to-opnfv-artifacts
151
152 - builder:
153     name: build-opnfv-composite-docs
154     builders:
155         - shell: |
156             #!/bin/bash -e
157             export PATH=$PATH:/usr/local/bin/
158             GERRIT_COMMENT=gerrit_comment.txt ./build-composite.sh