Clarification on using CI build referencing account packages
Hello,
My goal is to have a project that is able to reference other projects (via nuget packages) that are published to the account feed. I actually have projects working where I've manually referenced in the nuget.config, each of the sources for each of the other projects it depends on but this is a maintenance nightmare trying to ensure the projects have the correct sources and i'd rather just use the account feed.
Each attempt has given me "has timed out after 100000ms" which suggests it can't find/use the account.
How do I get a project to use the account feed as a source? I've seen that you can specify (I think) to use the account and project feed as part of the build using (in .yaml):
account_feed: true
project_feed: true
When I do, I see the timeout. I've also tried providing the account in the nuget.config and even adding environment variables (user/pass) so it can access the feed, still the same timeout issue.
I do however, see the account as a nuget source when I print out (nuget sources) as part of the build.
Can anyone help to guide me on doing this and what I might be doing wrong?
regards,
Phil
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Owen McDonnell on 28 Mar, 2019 03:36 PM
I don't know if that was meant as a literal sample from your config but if you are adding those values to you
appveyor.yml
config file they should be within anuget:
key.i.e.
2 Posted by Phil Cooper on 28 Mar, 2019 07:59 PM
Yes, sorry - they were taken out of context.
So to be clear, if those options are specified, the build will attempt to pull packages from the account and project feeds if it can't find them in the nuget repository?
If that is the case, is there anything else that needs to be configured to allow this i.e. credentials in the environment variables?
Thanks for taking the time to answer.
Support Staff 3 Posted by Owen McDonnell on 29 Mar, 2019 07:02 AM
Can you try explicitly adding account feed as a nuget source by adding this command to
with the username/password variables added to environment as secure variables.install:
stage instead ofaccount_feed: true
4 Posted by Phil Cooper on 29 Mar, 2019 08:45 AM
Awesome, that's working now, here's the final yml and environment variables added via the settings UI for that project:
version: 1.0.{build}
image: Visual Studio 2017
cache: packages -> **\packages.config
nuget:
account_feed: false
project_feed: false
before_build:
- cmd: nuget restore
install:
nuget sources add -Name AppVeyorAccount -source https://ci.appveyor.com/nuget/account-feed-name -UserName %APPVEYOR_USERNAME% -password "%APPVEYOR_PASSWORD%"
build:
project: project.sln
publish_nuget: true
include_nuget_references: true
verbosity: minimal
Many thanks for your help & time.
Phil
Support Staff 5 Posted by Owen McDonnell on 29 Mar, 2019 04:26 PM
No problem. Thanks for sharing your working solution.
Owen McDonnell closed this discussion on 29 Mar, 2019 04:26 PM.