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