blob: 34cbc74eeff7fd070237254fc2a10b98d0304f11 [file] [log] [blame]
- job:
name: tf-a-tftf-docs-watcher
node: docker-amd64-tf-a-jammy
project-type: freestyle
concurrent: false
description: Triggers whenever a code change is merged into the master branch of the TF-A-Tests repository. Executes a webhook to trigger the ReadTheDocs service to build a fresh copy of the documentation for one or more branches.
disabled: false
builders:
- shell: |-
#!/bin/bash -e
echo "Trigger ReadTheDocs build on the $RTD_BRANCHES branch and the latest version"
RTD_API="https://readthedocs.org/api/v3/projects/trustedfirmware-a-tests"
curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/$RTD_BRANCHES/builds/ | jq .
echo "Trigger build latest version"
curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/latest/builds/ | jq .
properties:
- build-discarder:
days-to-keep: 7
num-to-keep: 10
triggers:
- gerrit:
silent: true
server-name: review.trustedfirmware.org
projects:
- branches:
- branch-compare-type: PLAIN
branch-pattern: master
project-compare-type: PLAIN
project-pattern: TF-A/tf-a-tests
trigger-on:
- ref-updated-event
wrappers:
- timestamps
- credentials-binding:
- text:
credential-id: Trusted_Firmware_Tests_ReadTheDocs_Token
variable: RTD_TOKEN
parameters:
- string:
name: RTD_BRANCHES
default: master
description: |
The branch, or branches, to rebuild the documentation for.
publishers:
- workspace-cleanup