blob: c6bec58ecf5d01fc7153e771770cfd74ccabb2ad [file] [log] [blame]
Rich Bennett5768a922017-08-11 14:18:48 -04001---
2- job-template:
3 # Job template for verifying Sphinx/Restructured Text for RTD
4 #
5 # The purpose of this job template is verify documentation source
6 #
7 # Required Variables:
8 # branch: git branch
9 # Optional Variables:
10 # path: directory containing the project's tox.ini relative to
11 # the workspace. The default is the project root.
Rich Bennett5768a922017-08-11 14:18:48 -040012
13 name: '{project-name}-{stream}-verify-rtd'
14 path: '$WORKSPACE'
15
16 project-type: freestyle
17 concurrent: true
18 node: '{build-node}'
19
20 properties:
21 - infra-properties:
22 build-days-to-keep: '{build-days-to-keep}'
23
24 parameters:
25 - infra-parameters:
26 project: '{project}'
27 branch: '{branch}'
28 refspec: 'refs/heads/{branch}'
29 artifacts: '{archive-artifacts}'
30 - maven-exec:
31 maven-version: '{maven-version}'
32
33 scm:
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -050034 - git:
35 credentials-id: '{jenkins-ssh-credential}'
36 url: '$GIT_BASE'
Rich Bennettc46a2ee2017-08-22 15:28:45 -040037 refspec: ''
Jeremy Phelps9d710b42017-08-23 17:10:18 -050038 choosing-strategy: 'default'
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -050039 branches:
Jeremy Phelps9d710b42017-08-23 17:10:18 -050040 - 'refs/heads/{branch}'
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -050041 skip-tag: true
42 wipe-workspace: true
Jeremy Phelps5954c952017-08-23 12:33:45 -050043 submodule:
44 recursive: '{submodule-recursive}'
Rich Bennett5768a922017-08-11 14:18:48 -040045
46 wrappers:
47 - infra-wrappers:
48 build-timeout: '{build-timeout}'
49
50 triggers:
51 - gerrit-trigger-patch-submitted:
52 server: '{server-name}'
53 project: '**'
54 branch: '{branch}'
55 files: 'docs/**/*.rst'
56 - timed: 'H H * * *'
57
58 builders:
59 - shell: |
60 if [ "$GERRIT_PROJECT" != "doc" ]; then
61 cd docs/submodules/$GERRIT_PROJECT
62 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
63 else
64 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
65 fi
66 - shell: |
67 #!/bin/bash
68 virtualenv $WORKSPACE/venv-tox
69 source $WORKSPACE/venv-tox/bin/activate
70 pip install --upgrade pip
71 pip install --upgrade tox argparse
72 pip freeze
73 cd $WORKSPACE/{path}
74 tox
75
76 publishers:
77 - infra-shiplogs:
78 maven-version: '{maven-version}'
79
80- job-template:
81 # Job template for merging/publishing Sphinx/Restructured Text at RTD
82 #
83 # The purpose of this job template is to trigger updates after
84 # a merge of documentation source in gerrit
85 #
86 # Required Variables:
87 # branch: git branch
88 # rtdproject: name of a project at readthedocs.io
89 # Optional Variables:
90 # path: directory containing the project's tox.ini relative to
91 # the workspace. The default is the project root.
Rich Bennett5768a922017-08-11 14:18:48 -040092
93 name: '{project-name}-{stream}-merge-rtd'
94 path: '$WORKSPACE'
95
96 project-type: freestyle
97 concurrent: false
98 node: '{build-node}'
99
100 properties:
101 - infra-properties:
102 build-days-to-keep: '{build-days-to-keep}'
103
104 parameters:
105 - infra-parameters:
106 project: '{project}'
107 branch: '{branch}'
108 refspec: 'refs/heads/{branch}'
109 artifacts: '{archive-artifacts}'
110 - maven-exec:
111 maven-version: '{maven-version}'
112
113 scm:
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -0500114 - git:
115 credentials-id: '{jenkins-ssh-credential}'
116 url: '$GIT_BASE'
Rich Bennettc46a2ee2017-08-22 15:28:45 -0400117 refspec: ''
Jeremy Phelps9d710b42017-08-23 17:10:18 -0500118 choosing-strategy: 'default'
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -0500119 branches:
120 - 'refs/heads/{branch}'
121 skip-tag: true
122 wipe-workspace: true
Rich Bennett5768a922017-08-11 14:18:48 -0400123 submodule-recursive: '{submodule-recursive}'
124
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -0500125
Rich Bennett5768a922017-08-11 14:18:48 -0400126 wrappers:
127 - infra-wrappers:
128 build-timeout: '{build-timeout}'
129
130 triggers:
131 - gerrit:
132 server-name: '{server-name}'
133 trigger-on:
134 - change-merged-event
135 - comment-added-contains-event:
136 comment-contains-value: 'remerge'
137 projects:
138 - project-compare-type: 'ANT'
139 project-pattern: '**'
140 branches:
141 - branch-compare-type: 'ANT'
142 branch-pattern: '**/{branch}'
143 file-paths:
144 - compare-type: ANT
145 pattern: docs/**/*.rst
146
147 builders:
148 - shell: !include-raw: doc-post-rtd.sh
149
150 publishers:
151 - infra-shiplogs:
152 maven-version: '{maven-version}'
153