Merge "[Functest] Refactor Functest-suite job"
[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
38     builders:
39         - shell: !include-raw: docs-post-rtd.sh
40
41 - job-template:
42     name: 'docs-verify-rtd-{stream}'
43
44     project-type: freestyle
45
46     parameters:
47         - label:
48             name: SLAVE_LABEL
49             default: 'lf-build2'
50             description: 'Slave label on Jenkins'
51         - project-parameter:
52             project: '{project}'
53             branch: '{branch}'
54         - string:
55             name: GIT_BASE
56             default: https://gerrit.opnfv.org/gerrit/opnfvdocs
57             description: 'Git URL to use on this Jenkins Slave'
58     scm:
59         - git-scm-with-submodules:
60             branch: '{branch}'
61
62     triggers:
63         - gerrit-trigger-patchset-created:
64             server: 'gerrit.opnfv.org'
65             project: '**'
66             branch: '{branch}'
67             files: 'docs/**/*.rst'
68         - timed: 'H H * * *'
69
70     builders:
71         - shell: |
72             if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
73                 cd docs/submodules/$GERRIT_PROJECT
74                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
75             else
76                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
77             fi
78         - shell: |
79             sudo pip install virtualenv 
80             virtualenv $WORKSPACE/venv
81             source $WORKSPACE/venv/bin/activate
82             pip install --upgrade pip
83             pip freeze
84             pip install tox
85             tox -edocs