blob: 13b258310f6ca6eb632c481ad83627e90217b107 [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 Bennett824c1a82018-05-29 07:26:23 -040045 timeout: '12'
Rich Bennett5768a922017-08-11 14:18:48 -040046
47 wrappers:
48 - infra-wrappers:
49 build-timeout: '{build-timeout}'
50
51 triggers:
52 - gerrit-trigger-patch-submitted:
53 server: '{server-name}'
54 project: '**'
55 branch: '{branch}'
56 files: 'docs/**/*.rst'
57 - timed: 'H H * * *'
58
59 builders:
60 - shell: |
61 if [ "$GERRIT_PROJECT" != "doc" ]; then
Rich Bennettfbf863a2017-09-05 23:25:23 -040062 if [ -d docs/submodules/$GERRIT_PROJECT.git ]; then
63 cd docs/submodules/$GERRIT_PROJECT.git
64 else
65 cd docs/submodules/$GERRIT_PROJECT
66 fi
Rich Bennett5768a922017-08-11 14:18:48 -040067 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
68 else
69 git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD
70 fi
71 - shell: |
72 #!/bin/bash
73 virtualenv $WORKSPACE/venv-tox
74 source $WORKSPACE/venv-tox/bin/activate
75 pip install --upgrade pip
76 pip install --upgrade tox argparse
77 pip freeze
78 cd $WORKSPACE/{path}
79 tox
Rich Bennett824c1a82018-05-29 07:26:23 -040080 mkdir -p "$WORKSPACE/archives"
81 mv docs/_build/html "$WORKSPACE/archives/"
Rich Bennett5768a922017-08-11 14:18:48 -040082
83 publishers:
84 - infra-shiplogs:
85 maven-version: '{maven-version}'
86
87- job-template:
88 # Job template for merging/publishing Sphinx/Restructured Text at RTD
89 #
90 # The purpose of this job template is to trigger updates after
91 # a merge of documentation source in gerrit
92 #
93 # Required Variables:
94 # branch: git branch
95 # rtdproject: name of a project at readthedocs.io
96 # Optional Variables:
97 # path: directory containing the project's tox.ini relative to
98 # the workspace. The default is the project root.
Rich Bennett5768a922017-08-11 14:18:48 -040099
100 name: '{project-name}-{stream}-merge-rtd'
101 path: '$WORKSPACE'
102
103 project-type: freestyle
104 concurrent: false
105 node: '{build-node}'
106
107 properties:
108 - infra-properties:
109 build-days-to-keep: '{build-days-to-keep}'
110
111 parameters:
112 - infra-parameters:
113 project: '{project}'
114 branch: '{branch}'
115 refspec: 'refs/heads/{branch}'
116 artifacts: '{archive-artifacts}'
117 - maven-exec:
118 maven-version: '{maven-version}'
119
120 scm:
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -0500121 - git:
122 credentials-id: '{jenkins-ssh-credential}'
123 url: '$GIT_BASE'
Rich Bennettc46a2ee2017-08-22 15:28:45 -0400124 refspec: ''
Jeremy Phelps9d710b42017-08-23 17:10:18 -0500125 choosing-strategy: 'default'
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -0500126 branches:
127 - 'refs/heads/{branch}'
128 skip-tag: true
129 wipe-workspace: true
Rich Bennett5768a922017-08-11 14:18:48 -0400130 submodule-recursive: '{submodule-recursive}'
131
Jeremy Phelpsd6392dd2017-08-22 17:52:02 -0500132
Rich Bennett5768a922017-08-11 14:18:48 -0400133 wrappers:
134 - infra-wrappers:
135 build-timeout: '{build-timeout}'
136
137 triggers:
138 - gerrit:
139 server-name: '{server-name}'
140 trigger-on:
141 - change-merged-event
142 - comment-added-contains-event:
143 comment-contains-value: 'remerge'
144 projects:
145 - project-compare-type: 'ANT'
146 project-pattern: '**'
147 branches:
148 - branch-compare-type: 'ANT'
149 branch-pattern: '**/{branch}'
150 file-paths:
151 - compare-type: ANT
152 pattern: docs/**/*.rst
153
154 builders:
155 - shell: !include-raw: doc-post-rtd.sh
156
157 publishers:
158 - infra-shiplogs:
159 maven-version: '{maven-version}'
160