Merge "Made new doc job voting"
[releng.git] / jjb / opnfvdocs / docs-rtd.yaml
1 - project:
2     name: docs-rtd
3     jobs:
4         - 'docs-merge-rtd-{stream}'
5         - 'docs-verify-rtd-{stream}'
6
7     stream:
8         - master:
9             branch: 'master'
10
11     project: 'opnfvdocs'
12     rtdproject: 'opnfv'
13     # TODO: Archive Artifacts
14
15 - job-template:
16     name: 'docs-merge-rtd-{stream}'
17
18     project-type: freestyle
19
20     parameters:
21         - label:
22             name: SLAVE_LABEL
23             default: 'lf-build1'
24             description: 'Slave label on Jenkins'
25         - project-parameter:
26             project: '{project}'
27             branch: '{branch}'
28         - string:
29             name: GIT_BASE
30             default: https://gerrit.opnfv.org/gerrit/releng
31             description: 'Git URL to use on this Jenkins Slave'
32     scm:
33         - git-scm
34
35     triggers:
36         - gerrit-trigger-change-merged:
37             project: '**'
38             branch: '{branch}'
39             files: 'docs/**/*.*'
40
41     builders:
42         - shell: !include-raw: docs-post-rtd.sh
43
44 - job-template:
45     name: 'docs-verify-rtd-{stream}'
46
47     project-type: freestyle
48
49     parameters:
50         - label:
51             name: SLAVE_LABEL
52             default: 'lf-build2'
53             description: 'Slave label on Jenkins'
54         - project-parameter:
55             project: '{project}'
56             branch: '{branch}'
57         - string:
58             name: GIT_BASE
59             default: https://gerrit.opnfv.org/gerrit/opnfvdocs
60             description: 'Git URL to use on this Jenkins Slave'
61     scm:
62         - git-scm-with-submodules:
63             branch: '{branch}'
64
65     triggers:
66         - gerrit-trigger-patchset-created:
67             server: 'gerrit.opnfv.org'
68             project: '**'
69             branch: '{branch}'
70             files: 'docs/**/*.rst'
71         - timed: 'H H * * *'
72
73     builders:
74         - shell: |
75             if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
76                 cd docs/submodules/$GERRIT_PROJECT
77                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
78             else
79                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
80             fi
81         - shell: |
82             sudo pip install virtualenv 
83             virtualenv $WORKSPACE/venv
84             . $WORKSPACE/venv/bin/activate
85             pip install --upgrade pip
86             pip freeze
87             pip install tox
88             tox -edocs