gitlab-ci: include of include
Hi,
I didn't find in the documentation if it's possible or not, so I'm not sure if it's a bug or a known limitation, but when I try it seems that my include of include part is ignored (also ignored in the CI Lint).
So I have this :
- project my-generic-ci (ls -1)
common.yml
docker-build-mainbranch.yml
docker-build-minorbranch.yml
docker-build-tag.yml
docker-clean-mainbranch.yml
docker-clean-minorbranch.yml
docker-deploy-mainbranch-api.yml
docker-deploy-mainbranch-celery.yml
docker-deploy-mainbranch-redis.yml
docker-deploy-minorbranch-api.yml
docker-deploy-minorbranch-celery.yml
docker-deploy-minorbranch-redis.yml
docker-w-celery.yml
docker-wo-celery.yml
push-release.yml
README.md
unit-testing.yml
(I like to split in a smal parts, because the change between mainbranch/minorbranch are small, ex: my stages ordering are differents, and I can do a diff easily)
- docker-w-celery.yml (the same for docker-wo-celery without some files)
---
include:
- local: docker-build-mainbranch.yml # I've also tried using publish pages
- local: docker-build-minorbranch.yml
- local: docker-build-tag.yml
- local: docker-clean-mainbranch.yml
- local: docker-clean-minorbranch.yml
- local: docker-deploy-mainbranch-api.yml
- local: docker-deploy-minorbranch-api.yml
...
- common.yml
stages:
- docker_minorbranch_build
- docker_minorbranch_clean
- docker_minorbranch_clean_redis
- docker_minorbranch_purge
- docker_minorbranch_deploy_redis
- docker_minorbranch_deploy
- env_prep
- unit_testing
- code_quality
- security_analysis
- reporting
- push_release
- docker_mainbranch_build
- docker_mainbranch_clean
- docker_mainbranch_clean_redis
- docker_mainbranch_purge
- docker_mainbranch_deploy_redis
- docker_mainbranch_deploy
- docker_tag_build
- project myproject-using-ci .gitlab-ci.yml :
---
include:
- project: sav/myproject-ci
ref: wip_refonte
file: common.yml
- project: sav/myproject-ci
ref: wip_refonte
file: unit-testing.yml
- project: sav/myproject-ci # This one is ignored
ref: wip_refonte
file: docker-w-celery.yml
...
Nothing in the log when playing the CI
root@gitlab:~# gitlab-rake gitlab:env:info
System information
System: Debian 8.11
Current User: git
Using RVM: no
Ruby Version: 2.5.3p105
Gem Version: 2.7.6
Bundler Version:1.16.6
Rake Version: 12.3.2
Redis Version: 3.2.12
Git Version: 2.18.1
Sidekiq Version:5.2.3
Go Version: unknown
GitLab information
Version: 11.7.5
Revision: c5b5b18
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://gitlab.engsec
HTTP Clone URL: http://gitlab.engsec/some-group/some-project.git
SSH Clone URL: git@gitlab.engsec:some-group/some-project.git
Using LDAP: yes
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 8.4.4
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git
Best regards,
Edited by Benjamin