Describe your question in as much detail as possible:
I’ve read somewhere that it is possible to overwrite when a job that you get from a template by overwriting the conditions with an empty array.
# In the template /templates/.test.gitlab-ci.yml .job1-test stage: .pre script: "echo Test" only: - schedules # in .gitlab-ci.yml include: remote: - project: 'group/template-collection' ref: main file: '/templates/.test.gitlab-ci.yml' # This job should always run job1 extends: .job1-test only: 
In fact this does not work as expected. Setting
only to something else that is always true works as a general workaround but is not really what I’d expect.
Does anybody have experience with overwriting or clearing a part of an extended configurations?
What version are you on? Are you using self-managed or GitLab.com?
- GitLab: 15.4.1
- Runner : 15.4 (but also in CI Lint)
My general use case is a setup, where we have templates stored in a global repository that can be reused in multiple projects (such as security checks) which might be set to run anywhere from
.post and might be
schedules by default but might need to run on every run on some projects.
I guess this might be a bug, but not really sure.
Thanks for your support!