summaryrefslogtreecommitdiffstats
path: root/jjb/opnfvdocs/docs-rtd.yaml
blob: c3a9660ded51af6396c4789bdc25711939cc44e9 (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
---
- project:
    name: docs-rtd
    project: 'opnfvdocs'
    project-name: 'opnfvdocs'
    rtd-build-url: 'https://readthedocs.org/api/v2/webhook/opnfvdocsdemo/79560/'
    rtd-token: 'a96c3622a270344cf9bf3f73b0dfa04f59fc59c0'
    project-pattern: 'opnfvdocs'
    jobs:
      - '{project-name}-rtd-jobs'
      - 'docs-merge-rtd-{stream}'
      - 'docs-verify-rtd-{stream}'

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

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

    project-type: freestyle

    parameters:
      - label:
          name: SLAVE_LABEL
          default: 'lf-build2'
          description: 'Slave label on Jenkins'
          all-nodes: false
          node-eligibility: 'ignore-offline'
      - project-parameter:
          project: '{project}'
          branch: '{branch}'

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

    builders:
      - 'remove-old-docs-from-opnfv-artifacts'

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

    project-type: freestyle

    parameters:
      - label:
          name: SLAVE_LABEL
          default: 'lf-build2'
          description: 'Slave label on Jenkins'
          all-nodes: false
          node-eligibility: 'ignore-offline'
      - 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: 'opnfvdocs'
          branch: '{branch}'
          files: 'docs/**'

    builders:
      - shell: |
          sudo -H pip install virtualenv
          virtualenv $WORKSPACE/venv
          . $WORKSPACE/venv/bin/activate
          pip install --upgrade pip
          pip freeze
          pip install tox
          sed -i s,\-b\ html,\-b\ singlehtml,g tox.ini
          tox -edocs
      - 'upload-review-docs'