I’m currently looking to reduce the amount of duplicate code and the upkeep required for our pipelines. Currently we have about 18 pipelines which all depend on the install of npm and node_modules, I’m trying to find the best solution to be able to cut this duplicated code down and instead have it in one location which can be retrieved from each of the pipelines. Would something like an Instance template repository be best for this? or perhaps another method…
I did try the include: function as described here: https://docs.gitlab.com/ee/ci/yaml/includes.html but when trying I seem to get the following errors from the CI lint- ‘Included file is empty or does not exist!’ or ‘Included file does not have valid YAML syntax!’
Any help would be greatly appreciated!