11-21-2017 09:36 AM - edited 03-01-2019 04:02 AM
I created a NCS project for my custom NSO package. I am trying to dynamically pull the dependencies of my package using the project-meta-data.xml. I have defined the following entries
<packages-store>
<git>
<repo>ssh://git@github.com/MyUser/net-auto-common.git</repo>
<branch>develop</branch>
</git>
</packages-store>
<package>
<name>svc-notifications</name>
<git/>
</package>
<package>
<name>svc-actions</name>
<git/>
</package>
When I do ncs-project update -v (included in NSO 4.4.1) , ncs-project fails indicating it cannot clone the repository. From the error, I figured out ncs-project it is assuming my two packages svc-notifications and svc-actions are git submodules.
ncs-project error: {error,"failed to clone repository ~p\n",
["git@github.com/MyUser/net-auto-common.git/svc-notifications.git"]}Trace: [{ncs_project,
install_git_repo,
3,
I have put both packages on its own repo and made them git submodules. Issue still exists.
However, if I declare the each package and specify each of its repos, ncs-project runs with no issues .
<package>
<name>svc-notifications</name>
<git>
<repo>ssh://git@github.com/MyUser/svc-notifications.git</repo>
<branch>develop</branch>
</git
</package>
Solved! Go to Solution.
11-27-2017 08:16 AM
I believe this is what you want:
<packages-store>
<git>
<repo>ssh://git@github.com/MyUser</repo>
</git>
</packages-store>
<package>
<name>svc-notifications</name>
<git>
<branch>master</branch>
</git>
</package>
<package>
<name>svc-actions</name>
<git>
<tag>v1.0.1</tag>
</git>
</package>
This will get github.com/MyUser/svc-notifications and github.com/MyUser/svc-actions
Please note you can also skip the packages-store and just do
<package>
<name>svc-notifications</name>
<git>
<repo>ssh://git@github.com/MyUser/svc-notifications.git</repo>
<branch>master</branch>
</git>
</package>
11-27-2017 08:16 AM
I believe this is what you want:
<packages-store>
<git>
<repo>ssh://git@github.com/MyUser</repo>
</git>
</packages-store>
<package>
<name>svc-notifications</name>
<git>
<branch>master</branch>
</git>
</package>
<package>
<name>svc-actions</name>
<git>
<tag>v1.0.1</tag>
</git>
</package>
This will get github.com/MyUser/svc-notifications and github.com/MyUser/svc-actions
Please note you can also skip the packages-store and just do
<package>
<name>svc-notifications</name>
<git>
<repo>ssh://git@github.com/MyUser/svc-notifications.git</repo>
<branch>master</branch>
</git>
</package>
11-27-2017 09:02 AM
Fredrik
Thanks a lot for the reply. I tried your suggestion and it works. To summarize, the individual packages I want to use as dependencies must be on their own repo.
Is there any chance we can get the NSO Developer's Guide updated to include a note that describes that behavior. Also the ability to pull a code base by tag. Lastly, can we document what other attributes can be specified on the <git> </git> grouping. It will be great.
--Juan
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide