fix for rtd verfiy
[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-build1'
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-gerrit:
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             git submodule update --init
73             if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
74                 cd docs/submodules/$GERRIT_PROJECT
75                 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
76             fi
77             cd "$WORKSPACE"
78             for x in $(git submodule | awk '{{print $2}}');
79             do
80               cd "$x"
81               git filter-branch --subdirectory-filter docs/
82               cd -
83             done
84
85         - shell: |
86             sudo pip install virtualenv 
87             virtualenv $WORKSPACE/venv
88             source $WORKSPACE/venv/bin/activate
89             pip install --upgrade pip
90             pip freeze
91             pip install tox
92             tox -edocs