I want to trigger GitLab pipeline through API using this approach:
curl --request POST
–form token=TOKEN
–form ref=main
“https://gitlab.example.com/api/v4/projects//trigger/pipeline”
However, I have to specify template that should be used in child pipeline to achive same functionality like this:
microservice_a:
trigger:
include: path/to/microservice_a.yml
or this:
child-pipeline:
trigger:
include:
- project: ‘my-group/my-pipeline-library’
ref: ‘main’
file: ‘/path/to/child-pipeline.yml’
It would be great pass artifacts to child pipeline, if it is possible, to repeat this functionality with API:
child-pipeline:
trigger:
include:
- artifact: generated-config.yml