diff --git a/jobs/swh-docs.yaml b/jobs/swh-docs.yaml index 98a349c..966ee40 100644 --- a/jobs/swh-docs.yaml +++ b/jobs/swh-docs.yaml @@ -1,142 +1,146 @@ - project: name: DDOC display-name: swh-docs jobs: - "{name}" - "{name}/publish" - "{name}/dev" - "{name}/build-on-diff" - job-template: name: "{name}/publish" description: Build the documentation and publish it node: swh-sphinx auth-token: ph4br1cat0r properties: - build-discarder: days-to-keep: 90 triggers: - timed: "@midnight" scm: - git: url: https://forge.softwareheritage.org/source/swh-environment.git builders: - shell: | #!/bin/bash + set -ex + mr -j 4 -t update mr -j 4 -t run sh -c 'git checkout --detach `git describe --abbrev=0 --tags`; git clean -dfx' cd swh-docs git checkout master git clean -dfx SPHINXOPTCOLOR='--no-color' tox -e sphinx publishers: - ssh: target: "devel" site: "pergamon" clean-remote: true source: "swh-docs/docs/_build/html/**" remove-prefix: "swh-docs/docs/_build/html" fail-on-error: true verbose: true - ssh: target: "user" site: "pergamon" clean-remote: true source: "swh-docs/user/_build/html/**" remove-prefix: "swh-docs/user/_build/html" fail-on-error: true verbose: true - ssh: target: "sysadm" site: "pergamon" clean-remote: true source: "swh-docs/sysadm/_build/html/**" remove-prefix: "swh-docs/sysadm/_build/html" fail-on-error: true verbose: true - job-template: name: "{name}/dev" description: Build the documentation from git repos node: swh-sphinx auth-token: ph4br1cat0r properties: - build-discarder: days-to-keep: 90 triggers: - timed: "H 9-22/2 * * *" scm: - git: url: https://forge.softwareheritage.org/source/swh-environment.git builders: - shell: | #!/bin/bash + set -ex + crudini --del .mrconfig snippets crudini --del .mrconfig swh-py-template mr -j 4 -t update mr -t run sh -c 'echo -n "`basename $PWD` " && git describe' | grep -v 'mr run' > revisions.txt cd swh-docs git clean -dfx SPHINXOPTS='-W -q --keep-going -w errors.log' SPHINXOPTCOLOR='--no-color' tox -e sphinx-dev publishers: - archive: artifacts: "revisions.txt,swh-docs/docs/errors.log,swh-docs/.tox/log/*" - html-publisher: name: "SWH Documentation (HEAD)" dir: "swh-docs/docs/_build/html" files: "index.html" keep-all: false includes: "**/*" - html-publisher: name: "SWH User Documentation (HEAD)" dir: "swh-docs/user/_build/html" files: "index.html" keep-all: false includes: "**/*" - html-publisher: name: "SWH sysadmin Documentation (HEAD)" dir: "swh-docs/sysadm/_build/html" files: "index.html" keep-all: false includes: "**/*" - job-template: name: "{name}/build-on-diff" display_name: Phab. diff project-type: pipeline docker_image: sphinx concurrent: true sandbox: true auth-token: "ph4br1cat0r" properties: - build-discarder: artifact-num-to-keep: 20 days-to-keep: 90 parameters: - git-parameter: name: REVISION type: PT_REVISION defaultValue: master description: Git revision to build. - string: name: PHID description: PHID of the Phabricator target object on which results will be reported. - string: name: DIFF_ID description: ID of the Diff patch to apply, if any - string: name: REV_ID description: ID of the Phabricator revision, if any - string: name: STAGING_URI description: URI of the staging repository dsl: !include-jinja2: templates/swh-docs-pipeline-diff.groovy.j2