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

    stream:
        - danube:
            branch: 'master'
        - colorado:
            branch: 'stable/colorado'

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

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

    project-type: freestyle

    parameters:
        - project-parameter:
            project: '{project}'
            branch: '{branch}'
    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:
        - project-parameter:
            project: '{project}'
            branch: '{branch}'
    scm:
        - git-scm

    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 opnfvdocs/submodules/$GERRIT_PROJECT
                git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
            else
                git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
            fi
        - shell: |
            virtualenv $WORKSPACE/venv
            source $WORKSPACE/venv/bin/activate
            pip install --upgrade pip
            pip freeze
            pip install tox
            tox -edocs