diff --git a/jobs/templates/includes/agent-docker-sphinx.groovy.j2 b/jobs/templates/includes/agent-docker-sphinx.groovy.j2 new file mode 100644 --- /dev/null +++ b/jobs/templates/includes/agent-docker-sphinx.groovy.j2 @@ -0,0 +1,7 @@ +agent { + docker { + reuseNode true + image 'swh-jenkins/{{sphinx_docker_image}}' + args '--mount type=volume,src=shared-jenkins-cachedir,dst=/home/jenkins/.cache' + } +} diff --git a/jobs/templates/swh-pipeline-diff.yaml b/jobs/templates/swh-pipeline-diff.yaml --- a/jobs/templates/swh-pipeline-diff.yaml +++ b/jobs/templates/swh-pipeline-diff.yaml @@ -4,6 +4,7 @@ project-type: pipeline docker_image: tox cypress_docker_image: cypress + sphinx_docker_image: sphinx default-tox-environment: py3 sandbox: true auth-token: 'ph4br1cat0r' diff --git a/jobs/templates/swh-pipeline.groovy.j2 b/jobs/templates/swh-pipeline.groovy.j2 --- a/jobs/templates/swh-pipeline.groovy.j2 +++ b/jobs/templates/swh-pipeline.groovy.j2 @@ -98,6 +98,23 @@ {%- endif %} } } + + stage('Sphinx documentation') { + {% filter indent(width=6) %} + {%- include 'includes/agent-docker-sphinx.groovy.j2' -%} + {% endfilter %} + + steps { + sh ''' + if tox -a | grep -qx sphinx + then + tox -e sphinx + else + echo WARNING: no sphinx environment in tox.ini + fi + ''' + } + } // sphinx doc } // stages post { diff --git a/jobs/templates/swh-pipeline.yaml b/jobs/templates/swh-pipeline.yaml --- a/jobs/templates/swh-pipeline.yaml +++ b/jobs/templates/swh-pipeline.yaml @@ -4,6 +4,7 @@ project-type: pipeline docker_image: tox cypress_docker_image: cypress + sphinx_docker_image: sphinx default-tox-environment: py3 triggers: - timed: '@daily'