update opnfvdocs jjb to use build-composite.sh
[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     parameters:
122         - project-parameter:
123             project: '{project}'
124         - string:
125             name: GS_URL
126             default: '$GS_BASE{gs-pathname}'
127             description: "Directory where the build artifact will be located upon the completion of the build."
128         - string:
129             name: GIT_CLONE_BASE
130             default: ssh://gerrit.opnfv.org:29418
131             description: "Used for overriding the GIT URL coming from parameters macro."
132         - string:
133             name: GERRIT_BRANCH
134             default: '{branch}'
135             description: 'Specify the branch in this way in order to be able to use build-opnfv-composite-docs builder.'
136
137     scm:
138         - git-scm:
139             credentials-id: '{ssh-credentials}'
140             refspec: ''
141             branch: '{branch}'
142
143     triggers:
144         - timed: '0 H/6 * * *'
145
146     builders:
147         - build-opnfv-composite-docs
148 #        - upload-generated-docs-to-opnfv-artifacts
149
150 - builder:
151     name: build-opnfv-composite-docs
152     builders:
153         - shell: |
154             #!/bin/bash -e
155             export PATH=$PATH:/usr/local/bin/
156             GERRIT_COMMENT=gerrit_comment.txt ./build-composite.sh