Ability to split automation across multiple pipeline
Trigger pipelines using trigger tokens
Fire and forget
Launch pipeline in separate project
Load stages and jobs from a file using include
trigger/.gitlab-ci.yml
to root of new projectcurl
snippetmain
trigger
curl
snippet in script
blockTOKEN
as unprotected but masked CI variable
REF_NAME
with branch name (main
)See new .gitlab-ci.yml
:
git checkout 160_gitlab_ci/110_triggers/curl -- '*'
Users sees only their own tokens
Tokens of other users are hidden
Trigger owner must be able to either…
script
with trigger
keywordSpecify project and branch:
job_name:
trigger:
project: foo/bar
branch: main
parent-child/child.yml
to root of first projectReplace project
and branch
under trigger
with include
job_name:
trigger:
include: child.yml
Child pipeline can be made from multiple files
include
supports local
for files in the same repository
Use project
/ref
/file
for files in other repositories
Included file can also be generated before job start
Downstream pipelines inherit some variables
Job variables are passed on unless:
job_name:
inherit:
variables: false
Predefined variables must be redefined as job variables:
job_name:
variables:
my_var: ${CI_COMMIT_REF_NAME}
trigger:
#...
Do not redefined masked variables - they will not be masked