blob: b0c492b29d71db905ea97454705d7e39818530f6 [file] [log] [blame]
Theodore Grey15a535d2022-03-01 09:46:23 +01001- job:
Theodore Greyd88e6d02022-02-01 14:13:52 +01002 name: tf-a-docs-watcher
Paul Sokolovskybacbb152023-07-16 20:30:12 +03003 node: docker-amd64-tf-a-jammy
Theodore Greyd88e6d02022-02-01 14:13:52 +01004 project-type: freestyle
5 concurrent: false
6 description:
7 Triggers whenever a code change is merged into the master branch of the
8 TF-A repository. Executes a webhook to trigger the ReadTheDocs service to
9 build a fresh copy of the documentation for one or more branches.
Theodore Greya3451372022-02-22 10:19:47 +010010 disabled: false
Theodore Greyd88e6d02022-02-01 14:13:52 +010011 builders:
12 - shell: |-
13 #!/bin/bash -e
Arthur Shebd64e1c2025-03-31 19:14:01 -070014 echo "Trigger ReadTheDocs build on the $RTD_BRANCHES branch and the latest version"
Arthur Shec707d6a2025-03-04 03:45:09 +080015 RTD_API="https://readthedocs.org/api/v3/projects/trustedfirmware-a"
Arthur Shebd64e1c2025-03-31 19:14:01 -070016 echo "Trigger build $RTD_BRANCHES branch"
Arthur Shec707d6a2025-03-04 03:45:09 +080017 curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/$RTD_BRANCHES/builds/ | jq .
Arthur Shebd64e1c2025-03-31 19:14:01 -070018 echo "Trigger build latest version"
19 curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/latest/builds/ | jq .
Theodore Greyd88e6d02022-02-01 14:13:52 +010020 properties:
21 - build-discarder:
Paul Sokolovskyd1bb6e92023-07-16 20:33:03 +030022 days-to-keep: 60
Theodore Greyd88e6d02022-02-01 14:13:52 +010023 num-to-keep: 10
24 triggers:
25 - gerrit:
26 silent: true
27 server-name: 'review.trustedfirmware.org'
28 projects:
29 - branches:
Theodore Greydf91fdc2022-02-22 10:27:06 +010030 - branch-compare-type: PLAIN
31 branch-pattern: 'master'
Theodore Greyd88e6d02022-02-01 14:13:52 +010032 project-compare-type: PLAIN
33 project-pattern: 'TF-A/trusted-firmware-a'
34 trigger-on:
35 - ref-updated-event
36 wrappers:
37 - timestamps
38 - credentials-binding:
39 - text:
Arthur Shec707d6a2025-03-04 03:45:09 +080040 credential-id: TF-A-RTD-API-TOKEN
Theodore Greyd88e6d02022-02-01 14:13:52 +010041 variable: RTD_TOKEN
42 parameters:
43 - string:
44 name: RTD_BRANCHES
45 default: master
46 description: |
47 The branch, or branches, to rebuild the documentation for.
48 publishers:
49 - workspace-cleanup