Rich Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 1 | --- |
| 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 Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 12 | |
| 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 Phelps | d6392dd | 2017-08-22 17:52:02 -0500 | [diff] [blame] | 34 | - git: |
| 35 | credentials-id: '{jenkins-ssh-credential}' |
| 36 | url: '$GIT_BASE' |
Rich Bennett | c46a2ee | 2017-08-22 15:28:45 -0400 | [diff] [blame] | 37 | refspec: '' |
Jeremy Phelps | 9d710b4 | 2017-08-23 17:10:18 -0500 | [diff] [blame] | 38 | choosing-strategy: 'default' |
Jeremy Phelps | d6392dd | 2017-08-22 17:52:02 -0500 | [diff] [blame] | 39 | branches: |
Jeremy Phelps | 9d710b4 | 2017-08-23 17:10:18 -0500 | [diff] [blame] | 40 | - 'refs/heads/{branch}' |
Jeremy Phelps | d6392dd | 2017-08-22 17:52:02 -0500 | [diff] [blame] | 41 | skip-tag: true |
| 42 | wipe-workspace: true |
Jeremy Phelps | 5954c95 | 2017-08-23 12:33:45 -0500 | [diff] [blame] | 43 | submodule: |
| 44 | recursive: '{submodule-recursive}' |
Jessica Wagantall | 0f89441 | 2018-06-01 17:49:33 -0700 | [diff] [blame] | 45 | timeout: '24' |
Rich Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 46 | |
| 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 Bennett | fbf863a | 2017-09-05 23:25:23 -0400 | [diff] [blame] | 62 | 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 Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 67 | git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD |
| 68 | else |
| 69 | git fetch origin $GERRIT_REFSPEC && git checkout FETCH_HEAD |
| 70 | fi |
Rich Bennett | 4d4d7e7 | 2018-08-28 21:21:29 -0400 | [diff] [blame] | 71 | - shell: !include-raw: doc-install-plantuml.sh |
Rich Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 72 | - shell: | |
| 73 | #!/bin/bash |
| 74 | virtualenv $WORKSPACE/venv-tox |
| 75 | source $WORKSPACE/venv-tox/bin/activate |
| 76 | pip install --upgrade pip |
| 77 | pip install --upgrade tox argparse |
| 78 | pip freeze |
| 79 | cd $WORKSPACE/{path} |
| 80 | tox |
Rich Bennett | 824c1a8 | 2018-05-29 07:26:23 -0400 | [diff] [blame] | 81 | mkdir -p "$WORKSPACE/archives" |
| 82 | mv docs/_build/html "$WORKSPACE/archives/" |
Rich Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 83 | |
| 84 | publishers: |
| 85 | - infra-shiplogs: |
| 86 | maven-version: '{maven-version}' |
| 87 | |
| 88 | - job-template: |
| 89 | # Job template for merging/publishing Sphinx/Restructured Text at RTD |
| 90 | # |
| 91 | # The purpose of this job template is to trigger updates after |
| 92 | # a merge of documentation source in gerrit |
| 93 | # |
| 94 | # Required Variables: |
| 95 | # branch: git branch |
| 96 | # rtdproject: name of a project at readthedocs.io |
| 97 | # Optional Variables: |
| 98 | # path: directory containing the project's tox.ini relative to |
| 99 | # the workspace. The default is the project root. |
Rich Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 100 | |
| 101 | name: '{project-name}-{stream}-merge-rtd' |
| 102 | path: '$WORKSPACE' |
| 103 | |
| 104 | project-type: freestyle |
| 105 | concurrent: false |
| 106 | node: '{build-node}' |
| 107 | |
| 108 | properties: |
| 109 | - infra-properties: |
| 110 | build-days-to-keep: '{build-days-to-keep}' |
| 111 | |
| 112 | parameters: |
| 113 | - infra-parameters: |
| 114 | project: '{project}' |
| 115 | branch: '{branch}' |
| 116 | refspec: 'refs/heads/{branch}' |
| 117 | artifacts: '{archive-artifacts}' |
| 118 | - maven-exec: |
| 119 | maven-version: '{maven-version}' |
| 120 | |
| 121 | scm: |
Jeremy Phelps | d6392dd | 2017-08-22 17:52:02 -0500 | [diff] [blame] | 122 | - git: |
| 123 | credentials-id: '{jenkins-ssh-credential}' |
| 124 | url: '$GIT_BASE' |
Rich Bennett | c46a2ee | 2017-08-22 15:28:45 -0400 | [diff] [blame] | 125 | refspec: '' |
Jeremy Phelps | 9d710b4 | 2017-08-23 17:10:18 -0500 | [diff] [blame] | 126 | choosing-strategy: 'default' |
Jeremy Phelps | d6392dd | 2017-08-22 17:52:02 -0500 | [diff] [blame] | 127 | branches: |
| 128 | - 'refs/heads/{branch}' |
| 129 | skip-tag: true |
| 130 | wipe-workspace: true |
Rich Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 131 | submodule-recursive: '{submodule-recursive}' |
| 132 | |
Jeremy Phelps | d6392dd | 2017-08-22 17:52:02 -0500 | [diff] [blame] | 133 | |
Rich Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 134 | wrappers: |
| 135 | - infra-wrappers: |
| 136 | build-timeout: '{build-timeout}' |
Rich Bennett | 80d846f | 2019-01-09 11:31:16 -0500 | [diff] [blame] | 137 | - credentials-binding: |
| 138 | - text: |
| 139 | credential-id: docs-token |
| 140 | variable: DOCS_RTD_TOKEN |
Rich Bennett | 5768a92 | 2017-08-11 14:18:48 -0400 | [diff] [blame] | 141 | |
| 142 | triggers: |
| 143 | - gerrit: |
| 144 | server-name: '{server-name}' |
| 145 | trigger-on: |
| 146 | - change-merged-event |
| 147 | - comment-added-contains-event: |
| 148 | comment-contains-value: 'remerge' |
| 149 | projects: |
| 150 | - project-compare-type: 'ANT' |
| 151 | project-pattern: '**' |
| 152 | branches: |
| 153 | - branch-compare-type: 'ANT' |
| 154 | branch-pattern: '**/{branch}' |
| 155 | file-paths: |
| 156 | - compare-type: ANT |
| 157 | pattern: docs/**/*.rst |
| 158 | |
| 159 | builders: |
| 160 | - shell: !include-raw: doc-post-rtd.sh |
| 161 | |
| 162 | publishers: |
| 163 | - infra-shiplogs: |
| 164 | maven-version: '{maven-version}' |
| 165 | |