I have a template yml file(.common-template-ci.yml) which contains all the steps in a generic way, the .common-template-ci.yml in imported/include in the .gitlab-ci.yml. The idea of this setup is because we have different applications but they all have the CI/CD steps in common.
In the .common-template-ci.yml, I have defined the artifacts section to upload the artifacts.
In the .gitlab-ci.yml, I have the include : .common-template-ci.yml
Gitlab: Self managed and Version: 13.11.4-ee
Runner version: 13.10.0
What is expected?
I expect the artifacts are saved/uploaded.
What is seen?
The artifacts section is completely ignored.
Steps to reproduce :
1.) Create .common-template-ci.yml
stages: - upload_artifacts .upload_artifacts: stage: upload_artifacts script: - echo "This is an artifact" >> artifact.txt artifacts: paths: - artifact.txt allow_failure: false
2.) Create .gitlab-ci.yml
include: .common-template-ci.yml stages: - upload_artifacts upload_artifacts: stage: upload_artifacts script: - !reference [.upload_artifacts, script] tags: - artifact-runner
As seen below, the artifacts section is completely ignored.
Any pointer will be highly appreciated.
This text will be hidden