summaryrefslogtreecommitdiffstats
path: root/jjb/opnfvdocs/docs-rtd.yaml
blob: 4f9e11ac50e85ce3fe3d921cf0ccf9b2bf9064cc (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
86
87
88
89
- project:
    name: docs-rtd
    jobs:
        - 'docs-merge-rtd-{stream}'
        - 'docs-verify-rtd-{stream}'

    stream:
        - master:
            branch: 'master'
        - danube:
            branch: 'stable/{stream}'

    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
            description: 'Git URL to use on this Jenkins Slave'
    scm:
        - git-scm

    triggers:
        - gerrit-trigger-change-merged:
            project: '**'
            branch: '{branch}'
            files: 'docs/**/*.*'

    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/**/*.*'
        - 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