Azure Pipelines automatically builds and tests code projects to make them available to others. It works with just about any language or project type. Azure Pipelines combines continuous integration (CI) and continuous delivery (CD) to test and build your code and ship it to any target. YAML (or YML) is the language used to construct pipeline objects.
Questions tagged [azure-pipelines-yaml]
1379 questions
6
votes
2 answers
Docker volume mounts not working in Azure DevOps Pipeline
Docker volume mounts not working in Azure DevOps Pipeline, please find my code below:
I tried two approaches to run my docker container in the pipeline - please refer below - both returning empty volume - volume mount not happening. I'm not sure…

Mike Marsh
- 387
- 3
- 15
6
votes
2 answers
Secret Pipeline Parameter in Azure Devops
I have a use case where I want to use pipeline parameters in a yaml pipeline with user name and password.
For the username it's easy because I simply add the following in my parameters section.
parameters:
- name: Username
type: string
…

air duck
- 119
- 1
- 8
6
votes
4 answers
Can I use 2 agent pools in my azure pipelines?
I've got a single self-hosted agent. Its used as a kind of deployment agent.
All release versions of our software gets build by this agent and then copied to a network location.
Question: Is there a way I can utilize both the agent from the…

sommmen
- 6,570
- 2
- 30
- 51
6
votes
3 answers
how to rollback to previous build in azure devops using yaml
I have a multi-stage pipeline YAML deploying to different environments (PreDev-Dev-QA-Stage-Prod) and i'm trying to implement rollback strategy to rollback to previous version or previous build artifact and was looking at this page…

Ia1
- 500
- 1
- 7
- 15
6
votes
1 answer
Excluding projects from build in YAML configuration azure-pipelines
I am trying to exclude some projects from building in azure pipelines.
I tried the following options...
Trying to build only the projects under core?
- script: dotnet build **/Core/*.csproj --configuration $(buildConfiguration)
and
- script:…

Yves Schelpe
- 3,343
- 4
- 36
- 69
5
votes
0 answers
An error occurred "Variable with name customProject could not be found for the given service connection." while adding a task on Azure Pipeline YAML
I’m maintaining and developing “Sample CI” extension. I have installed this extension and getting an error **“Variable with name customProject could not be found for the given service connection.” ** when I try to add a “Test Suite” task in the…

Ayush Singh
- 51
- 4
5
votes
2 answers
Why Can't I Push to Azure Git From DevOps Pipeline
The error message is (TF401027: You need the Git 'GenericContribute' permission to perform this action. Details: identity 'Build\8ec5f0f1-6bca-4182-bb3e-2d47a64262bf', scope 'repository'.)
I've taken that GUID and confirmed that the account it…

TimTheEnchanter
- 3,370
- 1
- 26
- 47
5
votes
3 answers
Error NU5049 The pack command for SDK-style projects is not supported
My solution contains Framework 4.8 projects, .Net Standard 2.1 projects and .net6 projects. It has been running without problems for weeks.
Today build pipeline has started to fail with the error
##[error]The nuget command failed with exit code(1)…

Kirsten
- 15,730
- 41
- 179
- 318
5
votes
2 answers
Azure Pipelines - Build.SourceVersionMessage variable not working in expression function
I'm trying to insert an extra parameter in my pipeline based on a commit message fragment, running Azure DevOps Server 2020. I tried to implement it with the following code, without luck:
variables:
- name: commitMessage
value:…

JSON Derulo
- 9,780
- 7
- 39
- 56
5
votes
2 answers
Is there a way to force the use of the same agent directory for all jobs inside of a stage?
So I'm setting up a new build pipeline, which is quite complex, it is multi stage and inside the stages multi job.
But I run into problems because when I try to save some tasks by relying on the second and third job of one stage being executed in…

DanDan
- 1,038
- 4
- 15
- 28
5
votes
3 answers
Pipeline not work after updating to .net 6
I have updated my website to .net 6. It also works locally. However, my yaml pipeline in Azure DevOps is no longer running. There is an error in the publishing step for all .csproj files in solution like this. I don't know, how I can configure that…

Taladan
- 429
- 1
- 8
- 20
5
votes
1 answer
Issue With Yaml Variable Assignment With Bash
I am having issues when trying to assign variables with the following syntax in a yaml file. The follow code is taken from the Microsoft Doc on Define variables under the section Understand variable syntax:
variables:
- name: one
value:…

Danie Johnston
- 53
- 4
5
votes
1 answer
How to surface unit test failure messages as build errors in .Net Core?
We use dotnet test --no-build to run our unit tests during PR/CI builds:
- task: DotNetCoreCLI@2
${{ if eq(parameters.shortName, '') }}:
displayName: "Test ${{ parameters.name }}"
${{ if ne(parameters.shortName, '') }}:
displayName:…

mark
- 59,016
- 79
- 296
- 580
5
votes
4 answers
Azure YAML pipelines conditional insertion doesn't work
Consider the following pipeline snippet, this is part of a template.
- task: Bash@3
inputs:
targetType: 'inline'
script: |
echo "##vso[task.setvariable variable=AppType;]WebJob"
echo "##[debug] AppType set to WebJob"
# This…

goosseno
- 145
- 2
- 12
5
votes
2 answers
Azure pipeline - specify branch name in multiple repository
As a continuation to Azure DevOps - Handling single release for separate code repositories for UI and Dotnet API layer I am trying to proceed with checking out multiple repos in my yaml by defining it under repositories as shows below. I am unable…

KeenUser
- 5,305
- 14
- 41
- 62