summaryrefslogtreecommitdiffstats
path: root/jjb/opnfvdocs/docs-rtd.yaml
blob: 2d5ec4fa46a37a84260c086a780789827bfec3e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
- project:
    name: docs-rtd
    jobs:
        - 'docs-merge-rtd-{stream}'
        - 'docs-verify-rtd-{stream}'

    stream:
        - master:
            branch: 'master'

    project: 'opnfvdocs'
    rtdproject: 'opnfv'
    # TODO: Archive Artifacts

- job-template:
    name: 'docs-merge-rtd-{stream}'

    project-type: freestyle

    parameters:
        - label:
            name: SLAVE_LABEL
            default: 'lf-build1'
            description: 'Slave label on Jenkins'
        - project-parameter:
            project: '{project}'
            branch: '{branch}'
        - string:
            name: GIT_BASE
            default: https://gerrit.opnfv.org/gerrit/releng
            description: 'Git URL to use on this Jenkins Slave'
    scm:
        - git-scm

    triggers:
        - gerrit-trigger-change-merged

    builders:
        - shell: !include-raw: docs-post-rtd.sh

- job-template:
    name: 'docs-verify-rtd-{stream}'

    project-type: freestyle

    parameters:
        - label:
            name: SLAVE_LABEL
            default: 'lf-build2'
            description: 'Slave label on Jenkins'
        - project-parameter:
            project: '{project}'
            branch: '{branch}'
        - string:
            name: GIT_BASE
            default: https://gerrit.opnfv.org/gerrit/opnfvdocs
            description: 'Git URL to use on this Jenkins Slave'
    scm:
        - git-scm-with-submodules:
            branch: '{branch}'

    triggers:
        - gerrit-trigger-patchset-created:
            server: 'gerrit.opnfv.org'
            project: '**'
            branch: '{branch}'
            files: 'docs/**/*.rst'
        - timed: 'H H * * *'

    builders:
        - shell: |
            if [ "$GERRIT_PROJECT" != "opnfvdocs" ]; then
                cd docs/submodules/$GERRIT_PROJECT
                git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
            else
                git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
            fi
        - shell: |
            sudo pip install virtualenv 
            virtualenv $WORKSPACE/venv
            . $WORKSPACE/venv/bin/activate
            pip install --upgrade pip
            pip freeze
            pip install tox
            tox -edocs