Hi Avi, thanks for stopping by! It's amazing to see people like you finding the guide useful and actually following it.
I think the problem is that in your project A, you're declaring the variable POM: 'myfolder/pom.xml' on the pipeline level, and not on the job level. Hence it's perceived as a different variable from the original .compile_commit::variables::POM and GitLab does not parse it into the job
The easiest way to solve this is to make the template config job to be hidden, and then extend it again in Project A and change the variable POM:
In template config:
include:'/job_templates/compile_commit.gitlab-ci.yml'.compile_commit_config:# make this job hiddenstage:buildextends:.compile_commitvariable:POM:pom.xml
In Project A:
include:-project:'mygroup/ci_templates'ref:'master'file:'/job_templates/pipeline.gitlab-ci.yml'compile_commit:extends:.compile_commit_configvariables:POM:'myfolder/pom.xml'# add your variable inside the new job
Another approach would be to set the POM variable to be at the pipeline level from the beginning (remove it from the job and add it in the pipeline level). Then, override it in your Project A like you did. However, I haven't tested this solution so I can't 100% tell you that it will work. But it's worth trying it out. Let me know if that works also!
Minh
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Avi, thanks for stopping by! It's amazing to see people like you finding the guide useful and actually following it.
I think the problem is that in your project A, you're declaring the variable
POM: 'myfolder/pom.xml'
on the pipeline level, and not on the job level. Hence it's perceived as a different variable from the original.compile_commit::variables::POM
and GitLab does not parse it into the jobThe easiest way to solve this is to make the template config job to be hidden, and then extend it again in Project A and change the variable POM:
In template config:
In Project A:
Another approach would be to set the POM variable to be at the pipeline level from the beginning (remove it from the job and add it in the pipeline level). Then, override it in your Project A like you did. However, I haven't tested this solution so I can't 100% tell you that it will work. But it's worth trying it out. Let me know if that works also!
Minh