Chris Kay | 9666e88 | 2022-08-25 15:53:44 +0100 | [diff] [blame] | 1 | - job: |
| 2 | name: tf-a-docs-watcher |
Paul Sokolovsky | 43972d6 | 2023-07-16 20:23:51 +0300 | [diff] [blame] | 3 | node: docker-amd64-tf-a-jammy |
Chris Kay | 9666e88 | 2022-08-25 15:53:44 +0100 | [diff] [blame] | 4 | project-type: freestyle |
| 5 | concurrent: false |
Chris Kay | bb67440 | 2025-06-24 15:20:02 +0100 | [diff] [blame] | 6 | description: Triggers whenever a code change is merged into the master branch of the TF-A repository. Executes a webhook to trigger the ReadTheDocs service to build a fresh copy of the documentation for one or more branches. |
Chris Kay | 1c929b9 | 2022-10-11 10:46:31 +0100 | [diff] [blame] | 7 | disabled: false |
Chris Kay | 9666e88 | 2022-08-25 15:53:44 +0100 | [diff] [blame] | 8 | builders: |
Chris Kay | bb67440 | 2025-06-24 15:20:02 +0100 | [diff] [blame] | 9 | - shell: |- |
| 10 | #!/bin/bash -e |
| 11 | echo "Trigger ReadTheDocs build on the $RTD_BRANCHES branch and the latest version" |
| 12 | RTD_API="https://readthedocs.org/api/v3/projects/trustedfirmware-a" |
| 13 | echo "Trigger build $RTD_BRANCHES branch" |
| 14 | curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/$RTD_BRANCHES/builds/ | jq . |
| 15 | echo "Trigger build latest version" |
| 16 | curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/latest/builds/ | jq . |
Chris Kay | 9666e88 | 2022-08-25 15:53:44 +0100 | [diff] [blame] | 17 | properties: |
Chris Kay | bb67440 | 2025-06-24 15:20:02 +0100 | [diff] [blame] | 18 | - build-discarder: |
| 19 | days-to-keep: 60 |
| 20 | num-to-keep: 10 |
Chris Kay | 9666e88 | 2022-08-25 15:53:44 +0100 | [diff] [blame] | 21 | wrappers: |
Chris Kay | bb67440 | 2025-06-24 15:20:02 +0100 | [diff] [blame] | 22 | - timestamps |
| 23 | - credentials-binding: |
| 24 | - text: |
| 25 | credential-id: TF-A-RTD-API-TOKEN |
| 26 | variable: RTD_TOKEN |
Chris Kay | 9666e88 | 2022-08-25 15:53:44 +0100 | [diff] [blame] | 27 | parameters: |
Chris Kay | bb67440 | 2025-06-24 15:20:02 +0100 | [diff] [blame] | 28 | - string: |
| 29 | name: RTD_BRANCHES |
| 30 | default: master |
| 31 | description: | |
| 32 | The branch, or branches, to rebuild the documentation for. |
Chris Kay | 9666e88 | 2022-08-25 15:53:44 +0100 | [diff] [blame] | 33 | publishers: |
Chris Kay | bb67440 | 2025-06-24 15:20:02 +0100 | [diff] [blame] | 34 | - workspace-cleanup |