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