File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff 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
234236Typical users do not need to know the underlying workflow behind the scenes, so you can stop reading here.
You can’t perform that action at this time.
0 commit comments