I need to pass the branch name in git-dependencies as a parameter. But in my packages.json, I am unable to do so. The structure looks something like following:
{
"servers" : [
...
],
"target" : "apps",
"git" : {
"git-remote" : "..."
},
"source" : {
"git-dependencies-path": "../",
"source-packages-path" : "../"
},
"wiki" : {
"local-wiki-path" : "../",
"git-wiki-path" : ""
},
"git-dependencies" : [ {"repository" : "application/app1", "branch" : "development", "source-packages" : [ "."]}, //the branch name I want to parameterize}],
}
I suggest putting the mainstay of the final
packages.jsonin a.templateand simply appending the branch name and closing parens, etc at ci runtime. You can keep your 'true'package.jsonin git and just overwrite it then too.package.json.template:
gitlab-ci.yml:
If you have more involved needs for filling the
packages.jsonI'd suggest using a python script with a string template or jinja template