Merge "Update Yamllint Version"
[releng.git] / jjb / opnfvdocs / docs-rtd.yaml
1 ---
2 - project:
3     name: docs-rtd
4     jobs:
5       - 'docs-merge-rtd-{stream}'
6       - 'docs-verify-rtd-{stream}'
7
8     stream:
9       - master:
10           branch: 'master'
11       - danube:
12           branch: 'stable/{stream}'
13       - euphrates:
14           branch: 'stable/{stream}'
15
16     project: 'opnfvdocs'
17     rtdproject: 'opnfv'
18     # TODO: Archive Artifacts
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       - project-parameter:
31           project: '{project}'
32           branch: '{branch}'
33
34     triggers:
35       - gerrit-trigger-change-merged:
36           project: '**'
37           branch: '{branch}'
38           files: 'docs/**/*.*'
39
40     builders:
41       - 'remove-old-docs-from-opnfv-artifacts'
42       - shell: |
43           if [ $GERRIT_BRANCH == "master" ]; then
44             RTD_BUILD_VERSION=latest
45           else
46             RTD_BUILD_VERSION=${{GERRIT_BRANCH/\//-}}
47           fi
48           curl -X POST --data "version_slug=$RTD_BUILD_VERSION" https://readthedocs.org/build/opnfvdocsdemo
49
50
51 - job-template:
52     name: 'docs-verify-rtd-{stream}'
53
54     project-type: freestyle
55
56     parameters:
57       - label:
58           name: SLAVE_LABEL
59           default: 'lf-build2'
60           description: 'Slave label on Jenkins'
61       - project-parameter:
62           project: '{project}'
63           branch: '{branch}'
64       - string:
65           name: GIT_BASE
66           default: https://gerrit.opnfv.org/gerrit/opnfvdocs
67           description: 'Git URL to use on this Jenkins Slave'
68
69     scm:
70       - git-scm-with-submodules:
71           branch: '{branch}'
72
73     triggers:
74       - gerrit-trigger-patchset-created:
75           server: 'gerrit.opnfv.org'
76           project: '**'
77           branch: '{branch}'
78           files: 'docs/**/*.*'
79
80     builders:
81       - shell: |
82           if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
83               cd docs/submodules/$GERRIT_PROJECT
84               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
85           else
86               git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
87           fi
88       - shell: |
89           sudo pip install virtualenv
90           virtualenv $WORKSPACE/venv
91           . $WORKSPACE/venv/bin/activate
92           pip install --upgrade pip
93           pip freeze
94           pip install tox
95           sed -i s,\-b\ html,\-b\ singlehtml,g tox.ini
96           tox -edocs
97       - 'upload-review-docs'