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