Theodore Grey | 9880284 | 2022-03-29 12:46:03 +0200 | [diff] [blame] | 1 | - job: |
| 2 | name: tf-a-tftf-docs-watcher |
Paul Sokolovsky | 85b282b | 2023-08-05 07:20:17 +0300 | [diff] [blame] | 3 | node: docker-amd64-tf-a-jammy |
Theodore Grey | 9880284 | 2022-03-29 12:46:03 +0200 | [diff] [blame] | 4 | project-type: freestyle |
| 5 | concurrent: false |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 6 | 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. |
Theodore Grey | 9880284 | 2022-03-29 12:46:03 +0200 | [diff] [blame] | 7 | disabled: false |
| 8 | builders: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 9 | - shell: |- |
| 10 | #!/bin/bash -e |
Arthur She | d40ae28 | 2025-07-03 06:54:43 -0700 | [diff] [blame] | 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-tests" |
| 13 | curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/$RTD_BRANCHES/builds/ | jq . |
| 14 | echo "Trigger build latest version" |
| 15 | curl -s -X POST -H "Authorization: Token ${RTD_TOKEN}" ${RTD_API}/versions/latest/builds/ | jq . |
Theodore Grey | 9880284 | 2022-03-29 12:46:03 +0200 | [diff] [blame] | 16 | properties: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 17 | - build-discarder: |
| 18 | days-to-keep: 7 |
| 19 | num-to-keep: 10 |
Theodore Grey | 9880284 | 2022-03-29 12:46:03 +0200 | [diff] [blame] | 20 | triggers: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 21 | - gerrit: |
| 22 | silent: true |
| 23 | server-name: review.trustedfirmware.org |
| 24 | projects: |
| 25 | - branches: |
| 26 | - branch-compare-type: PLAIN |
| 27 | branch-pattern: master |
| 28 | project-compare-type: PLAIN |
| 29 | project-pattern: TF-A/tf-a-tests |
| 30 | trigger-on: |
| 31 | - ref-updated-event |
Theodore Grey | 9880284 | 2022-03-29 12:46:03 +0200 | [diff] [blame] | 32 | wrappers: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 33 | - timestamps |
| 34 | - credentials-binding: |
| 35 | - text: |
| 36 | credential-id: Trusted_Firmware_Tests_ReadTheDocs_Token |
| 37 | variable: RTD_TOKEN |
Theodore Grey | 9880284 | 2022-03-29 12:46:03 +0200 | [diff] [blame] | 38 | parameters: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 39 | - string: |
| 40 | name: RTD_BRANCHES |
| 41 | default: master |
| 42 | description: | |
| 43 | The branch, or branches, to rebuild the documentation for. |
Theodore Grey | 9880284 | 2022-03-29 12:46:03 +0200 | [diff] [blame] | 44 | publishers: |
Chris Kay | 675db4f | 2025-06-24 14:14:34 +0100 | [diff] [blame] | 45 | - workspace-cleanup |