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