Fix for installing aws.lambda.tools along side nuget.config with priv… #355
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ate feed.
This change will always allow aws.lambda.tools to be installed in the buildpipeline regardless of the presence of a private feed in the nuget config.
Description
I changed the installation command from
dotnet install aws.lambda.tools
to
dotnet install -g --ignore-failed-sourced --add-source https://api.nuget.org/v3/index.json --version '*'
Motivation
The installation will fail if you have a nuget.config file with a private feed in it. See tickets:
dotnet/sdk#9555
To replicate the issue, try to build any lambda project, with a nuget.config file with a private feed listed.
Related Issue(s), If Filed
dotnet/sdk#9555
Related to tickets where the user is unable to use the pipeline
#354
#350
There is the possibility to add a version number to the aws.lambda.tools installation command, so we can force it on 4.0.0, and avoid it loading a older version from a private feed. But by selecting version '*' we keep the same version selection logic as today, and don't change that part.
Testing
I have replicated the installation process on my own PC, by simply running the dotnet install command along side a nuget.config package.
I don't have access to a private devops setup. So I have not been able to verify the setup live.
Can someone help test this on a devops pipeline before merging?
Checklist
npm run newChange
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.