Reputation: 12662
Suppose main project has sub-projects
MainProject/
\-------- android
\-------- .gitlab-ci-android.yml
\-------- ios
\-------- lib
\-------- .gitlab-ci.yml
I want my .gitlab-ci.yml to run parallel jobs for each subfolder. My goal is to have separate .gitlab-ci.yml files. Yes, it looks messy to touch only one file when you have to configure the CI of a few projects.
What is the exact command line to run jobs from the main .gitlab-ci.yml?
I tried with , but not working
jobAndroid:
script: "gitlab-runner exec android/.gitlab-ci-android.yml"
Upvotes: 8
Views: 7996
Reputation: 5594
You can use the include:local syntax for this. Include the CI files from your subfolders in your main .gitlab-ci.yml
file.
include:
- local: '/android/.gitlab-ci-android.yml'
Upvotes: 14