Skip to content

Commit b9fdab4

Browse files
authored
add missing information how to API trigger on PR/tag/SHA (#203)
This PR adds the missing information that was available on the old KB, and not ported fully to this docs.
1 parent 9f4992a commit b9fdab4

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

docs/services/cicd.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,21 @@ It is the same thing.
216216
[](){#ref-cicd-pipeline-triggers-api}
217217
#### API call triggering
218218
- It is possible to trigger a pipeline via an API call
219-
- Create a file named `data.yaml`, with the content
220-
```yaml
221-
ref: main
222-
pipeline: pipeline_name
223-
variables:
224-
MY_VARIABLE: some_value
225-
ANOTHER_VAR: other_value
226-
```
227-
Send a POST request to the middleware
228-
```bash
229-
curl -X POST -u 'repository_id:webhook_secret' --data-binary @data.yaml https://cicd-ext-mw.cscs.ch/ci/pipeline/trigger
230-
```
231-
- replace repository_id and webhook_secret with your repository id and the webhook secret.
219+
- Create a file `data.yaml`, with the content
220+
```yaml title="data.yaml"
221+
ref: main
222+
pipeline: pipeline_name
223+
variables:
224+
MY_VARIABLE: some_value
225+
ANOTHER_VAR: other_value
226+
```
227+
- Send a POST request to the middleware (replace `repository_id` and `webhook_secret`)
228+
```console
229+
$ curl -X POST -u 'repository_id:webhook_secret' --data-binary @data.yaml https://cicd-ext-mw.cscs.ch/ci/pipeline/trigger
230+
```
231+
- To trigger a pull-request use `ref: 'pr:<pr-number>'`
232+
- To trigger a tag use `ref: 'tag:<tag-name>'`
233+
- To trigger on a specific commit SHA use `ref: 'sha:<commit-sha>'`
232234
233235
### Understanding the underlying workflow
234236
Typical users do not need to know the underlying workflow behind the scenes, so you can stop reading here.

0 commit comments

Comments
 (0)