Merge "Create Stable Branch Jobs for opnfvdocs"
[releng.git] / jjb / opnfvdocs / docs-rtd.yaml
1 ---
2 - project:
3     name: docs-rtd
4     project: 'opnfvdocs'
5     project-name: 'opnfvdocs'
6     rtd-build-url: 'https://readthedocs.org/api/v2/webhook/opnfvdocsdemo/79560/'
7     rtd-token: 'a96c3622a270344cf9bf3f73b0dfa04f59fc59c0'
8     project-pattern: 'opnfvdocs'
9     jobs:
10       - '{project-name}-rtd-jobs'
11       - 'docs-merge-rtd-{stream}'
12       - 'docs-verify-rtd-{stream}'
13
14     stream:
15       - master:
16           branch: 'master'
17       - hunter:
18           branch: 'stable/{stream}'
19
20 - job-template:
21     name: 'docs-merge-rtd-{stream}'
22
23     project-type: freestyle
24
25     parameters:
26       - label:
27           name: SLAVE_LABEL
28           default: 'lf-build1'
29           description: 'Slave label on Jenkins'
30           all-nodes: false
31           node-eligibility: 'ignore-offline'
32       - project-parameter:
33           project: '{project}'
34           branch: '{branch}'
35
36     triggers:
37       - gerrit-trigger-change-merged:
38           project: '**'
39           branch: '{branch}'
40           files: 'docs/**/*.*'
41
42     builders:
43       - 'remove-old-docs-from-opnfv-artifacts'
44
45 - job-template:
46     name: 'docs-verify-rtd-{stream}'
47
48     project-type: freestyle
49
50     parameters:
51       - label:
52           name: SLAVE_LABEL
53           default: 'lf-build2'
54           description: 'Slave label on Jenkins'
55           all-nodes: false
56           node-eligibility: 'ignore-offline'
57       - project-parameter:
58           project: '{project}'
59           branch: '{branch}'
60       - string:
61           name: GIT_BASE
62           default: https://gerrit.opnfv.org/gerrit/opnfvdocs
63           description: 'Git URL to use on this Jenkins Slave'
64
65     scm:
66       - git-scm-with-submodules:
67           branch: '{branch}'
68
69     triggers:
70       - gerrit-trigger-patchset-created:
71           server: 'gerrit.opnfv.org'
72           project: 'opnfvdocs'
73           branch: '{branch}'
74           files: 'docs/**'
75
76     builders:
77       - shell: |
78           sudo -H pip install virtualenv
79           virtualenv $WORKSPACE/venv
80           . $WORKSPACE/venv/bin/activate
81           pip install --upgrade pip
82           pip freeze
83           pip install tox
84           sed -i s,\-b\ html,\-b\ singlehtml,g tox.ini
85           tox -edocs
86       - 'upload-review-docs'