Seamless NuGet Authentication to Azure DevOps Artifacts from Dockerfile

When performing .NET Multi-stage builds within a Dockerfile, it may be required to restore some artifacts from an Azure DevOps Artifact Feed. I have previosuly seen this process being achieved by using the Replace Tokens Azure DevOps Task to insert a PAT token into the Dockerfile during the build pipeline. This approach requires that you to update your nuget.config files to include a <packageSourceCredentials></packageSourceCredentials> section with a Username and ClearTextPassword key, then use token replacement for the value. [Read More]

Create Dynamic Azure DevOps Variable Insertion when using Templates

There are scenarios where it might be useful to call a template and have that template define variables dynamically based on the provided parameters. The main use case I have seen for this is when the Replace Tokens Azure DevOps Task is called. Token replacement can be extremely useful if you have lots of dynamic values that need to be inserted into your configuration based on inputs from the pipeline. For example, when using the same repo for DEV, UAT and PROD. [Read More]