Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions docs/services/cicd.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,21 @@ It is the same thing.
[](){#ref-cicd-pipeline-triggers-api}
#### API call triggering
- It is possible to trigger a pipeline via an API call
- Create a file named `data.yaml`, with the content
```yaml
ref: main
pipeline: pipeline_name
variables:
MY_VARIABLE: some_value
ANOTHER_VAR: other_value
```
Send a POST request to the middleware
```bash
curl -X POST -u 'repository_id:webhook_secret' --data-binary @data.yaml https://cicd-ext-mw.cscs.ch/ci/pipeline/trigger
```
- replace repository_id and webhook_secret with your repository id and the webhook secret.
- Create a file `data.yaml`, with the content
```yaml title="data.yaml"
ref: main
pipeline: pipeline_name
variables:
MY_VARIABLE: some_value
ANOTHER_VAR: other_value
```
- Send a POST request to the middleware (replace `repository_id` and `webhook_secret`)
```console
$ curl -X POST -u 'repository_id:webhook_secret' --data-binary @data.yaml https://cicd-ext-mw.cscs.ch/ci/pipeline/trigger
```
- To trigger a pull-request use `ref: 'pr:<pr-number>'`
- To trigger a tag use `ref: 'tag:<tag-name>'`
- To trigger on a specific commit SHA use `ref: 'sha:<commit-sha>'`

### Understanding the underlying workflow
Typical users do not need to know the underlying workflow behind the scenes, so you can stop reading here.
Expand Down