Merge "relax limit of jenlins log hold number (40 -> 100)"
[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
36     scm:
37         - gerrit-trigger-scm:
38             credentials-id: '{ssh-credentials}'
39             refspec: '$GERRIT_REFSPEC'
40             choosing-strategy: 'gerrit'
41
42     triggers:
43         - gerrit:
44             trigger-on:
45                 - patchset-created-event:
46                     exclude-drafts: 'false'
47                     exclude-trivial-rebase: 'false'
48                     exclude-no-code-change: 'false'
49                 - draft-published-event
50                 - comment-added-contains-event:
51                     comment-contains-value: 'recheck'
52                 - comment-added-contains-event:
53                     comment-contains-value: 'reverify'
54             projects:
55               - project-compare-type: 'REG_EXP'
56                 project-pattern: '{project}'
57                 branches:
58                   - branch-compare-type: 'ANT'
59                     branch-pattern: '**/{branch}'
60                 file-paths:
61                   - compare-type: ANT
62                     pattern: 'docs/**'
63
64     builders:
65         - clone-opnfv-repos
66         - build-html-and-pdf-docs-output
67 #        - upload-under-review-docs-to-opnfv-artifacts
68         - report-docs-build-result-to-gerrit
69
70 - job-template:
71     name: 'opnfvdocs-merge-{stream}'
72
73     parameters:
74         - project-parameter:
75             project: $GERRIT_PROJECT
76         - gerrit-parameter:
77             branch: '{branch}'
78         - string:
79             name: GS_URL
80             default: '$GS_BASE{gs-pathname}'
81             description: "Directory where the build artifact will be located upon the completion of the build."
82
83     scm:
84         - gerrit-trigger-scm:
85             credentials-id: '{ssh-credentials}'
86             refspec: '$GERRIT_REFSPEC'
87             choosing-strategy: 'gerrit'
88
89     triggers:
90         - gerrit:
91             trigger-on:
92                 - change-merged-event
93                 - comment-added-contains-event:
94                     comment-contains-value: 'remerge'
95             projects:
96               - project-compare-type: 'REG_EXP'
97                 project-pattern: '{project}'
98                 branches:
99                   - branch-compare-type: 'ANT'
100                     branch-pattern: '**/{branch}'
101                 file-paths:
102                   - compare-type: ANT
103                     pattern: 'docs/**'
104
105     builders:
106         - clone-opnfv-repos
107         - build-html-and-pdf-docs-output
108 #        - upload-generated-docs-to-opnfv-artifacts
109         - report-docs-build-result-to-gerrit
110         - remove-old-docs-from-opnfv-artifacts
111
112 - job-template:
113     name: 'opnfvdocs-daily-{stream}'
114
115     parameters:
116         - project-parameter:
117             project: '{project}'
118         - string:
119             name: GS_URL
120             default: '$GS_BASE{gs-pathname}'
121             description: "Directory where the build artifact will be located upon the completion of the build."
122         - string:
123             name: GERRIT_BRANCH
124             default: '{branch}'
125             description: 'Specify the branch in this way in order to be able to use clone-opnfv-repos builder.'
126
127     scm:
128         - git-scm:
129             credentials-id: '{ssh-credentials}'
130             refspec: ''
131             branch: '{branch}'
132
133     triggers:
134         - timed: '0 H/6 * * *'
135
136     builders:
137         - clone-opnfv-repos
138         - build-html-and-pdf-docs-output
139 #        - upload-generated-docs-to-opnfv-artifacts
140
141 - builder:
142     name: clone-opnfv-repos
143     builders:
144         - shell: |
145             #!/bin/bash
146             set -o errexit
147             set -o nounset
148             set -o pipefail
149
150             # clone releng repo to get repo list
151             cd $WORKSPACE
152             echo "Cloning releng repo"
153             git clone $GIT_BASE/releng --quiet
154
155             # clone rest of the repos and checkout the branch
156             echo "Cloning repos of participating OPNFV Projects and checking out $GERRIT_BRANCH"
157             echo
158             echo "--------------------------------------------------------"
159             for repo in $(grep -v '^#' $WORKSPACE/releng/jjb/opnfvdocs/project.cfg | sort); do
160                 cd $WORKSPACE
161                 echo "    $repo"
162                 git clone $GIT_BASE/$repo --branch $GERRIT_BRANCH --quiet
163             done
164             echo "--------------------------------------------------------"
165             echo
166             echo "Done"
167
168             # remove releng clone in order not to cause issues for rest of the builders
169             /bin/rm -rf $WORKSPACE/releng