blob: 884c3706b81a344b236a98bb9a127df45feb83c5 [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
Rich Bennettfbf863a2017-09-05 23:25:23 -040061 if [ -d docs/submodules/$GERRIT_PROJECT.git ]; then
62 cd docs/submodules/$GERRIT_PROJECT.git
63 else
64 cd docs/submodules/$GERRIT_PROJECT
65 fi
Rich Bennett5768a922017-08-11 14:18:48 -040066 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
67 else
68 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
69 fi
70 - shell: |
71 #!/bin/bash
72 virtualenv $WORKSPACE/venv-tox
73 source $WORKSPACE/venv-tox/bin/activate
74 pip install --upgrade pip
75 pip install --upgrade tox argparse
76 pip freeze
77 cd $WORKSPACE/{path}
78 tox
79
80 publishers:
81 - infra-shiplogs:
82 maven-version: '{maven-version}'
83
84- job-template:
85 # Job template for merging/publishing Sphinx/Restructured Text at RTD
86 #
87 # The purpose of this job template is to trigger updates after
88 # a merge of documentation source in gerrit
89 #
90 # Required Variables:
91 # branch: git branch
92 # rtdproject: name of a project at readthedocs.io
93 # Optional Variables:
94 # path: directory containing the project's tox.ini relative to
95 # the workspace. The default is the project root.
Rich Bennett5768a922017-08-11 14:18:48 -040096
97 name: '{project-name}-{stream}-merge-rtd'
98 path: '$WORKSPACE'
99
100 project-type: freestyle
101 concurrent: false
102 node: '{build-node}'
103
104 properties:
105 - infra-properties:
106 build-days-to-keep: '{build-days-to-keep}'
107
108 parameters:
109 - infra-parameters:
110 project: '{project}'
111 branch: '{branch}'
112 refspec: 'refs/heads/{branch}'
113 artifacts: '{archive-artifacts}'
114 - maven-exec:
115 maven-version: '{maven-version}'
116
117 scm:
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -0500118 - git:
119 credentials-id: '{jenkins-ssh-credential}'
120 url: '$GIT_BASE'
Rich Bennettc46a2ee2017-08-22 15:28:45 -0400121 refspec: ''
Jeremy Phelps9d710b42017-08-23 17:10:18 -0500122 choosing-strategy: 'default'
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -0500123 branches:
124 - 'refs/heads/{branch}'
125 skip-tag: true
126 wipe-workspace: true
Rich Bennett5768a922017-08-11 14:18:48 -0400127 submodule-recursive: '{submodule-recursive}'
128
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -0500129
Rich Bennett5768a922017-08-11 14:18:48 -0400130 wrappers:
131 - infra-wrappers:
132 build-timeout: '{build-timeout}'
133
134 triggers:
135 - gerrit:
136 server-name: '{server-name}'
137 trigger-on:
138 - change-merged-event
139 - comment-added-contains-event:
140 comment-contains-value: 'remerge'
141 projects:
142 - project-compare-type: 'ANT'
143 project-pattern: '**'
144 branches:
145 - branch-compare-type: 'ANT'
146 branch-pattern: '**/{branch}'
147 file-paths:
148 - compare-type: ANT
149 pattern: docs/**/*.rst
150
151 builders:
152 - shell: !include-raw: doc-post-rtd.sh
153
154 publishers:
155 - infra-shiplogs:
156 maven-version: '{maven-version}'
157