Questions tagged [azure-yaml-pipelines]
146 questions
2
votes
2 answers
AzurePowerShell task cannot find filePath
I'm trying to run a PowerShell script in Azure Yaml Pipelines and I'm getting this error:
##[error]The term 'D:\a\1\s\myPowershellFile.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of…

Rachel
- 686
- 1
- 6
- 18
2
votes
1 answer
Pass variable between Azure Pipelines deployment jobs
We have two deployment jobs that run in the same stage. The first job creates an output variable and the second job uses that output variable (code borrowed from here and implemented the same way in our pipeline).
jobs:
- deployment: producer
…

StuartvdLee
- 75
- 1
- 8
2
votes
2 answers
Azure DevOps pipeline build name based on branch of different repository
We'd like to name our builds in such a way that it includes the date and the branch name, so that we can easily find the correct artifact when we want to deploy to one of our environments.
We have a setup where we have two repositories: YAML and…

StuartvdLee
- 75
- 1
- 8
2
votes
1 answer
Classic Vs YAML Pipeline - Approval & Gates / Checks in Azure Devops
We are using classic pipelines currently for Release through Azure Devops.
We are looking to move this to multi stage YAML as it will be easier to manager a standard template and track changes better.
As per our analysis, most of the features of…

user1643003
- 255
- 4
- 16
2
votes
1 answer
Accessing output variable more than once renders empty string
I'm trying to access an output variable from one stage in multiple consecutive stages.
The first time I access the variable I can access the value, but the next time I try it's an empty string.
In the example below B1 prints 'production' but C1…

Victor
- 359
- 1
- 6
- 14
2
votes
1 answer
How can I kill (not cancel) an errant Azure Pipeline run, stage, job, or task?
I want to know how to kill an Azure Pipeline task (or any level of execution - run, stage, job, etc.), so that I am not blocked waiting for an errant pipeline to finish executing or timeout.
For example, canceling the pipeline does not stop it…

successhawk
- 3,071
- 3
- 28
- 44
2
votes
1 answer
Azure DevOps pipeline - custom name of output file
I would like to ask you if it possible to create a custom name of zip file using output argument in in yaml task : DotNetCoreCLI@2
My yaml code:
- task: DotNetCoreCLI@2
inputs:
command: 'publish'
publishWebProjects: true
projects:…

azuremycry
- 122
- 7
2
votes
2 answers
Set variable group dynamically using System.PullRequest.TargetBranch
I am trying to set group dynamically in a pull request pipeline using azure devops. Yaml file looks like as below:
variables:
- ${{ if eq(variables['System.PullRequest.TargetBranch'], 'refs/heads/dev') }}:
- group: dev-var-group
This does not…

sblive
- 105
- 9
2
votes
1 answer
Build schedule for git tag
Is it possible to schedule a yaml pipeline using tags. What I want to achive, is an easy way to specify which commit to build. For this system, it needs to be rebuild on each deploy. I would like to not use branches for this as I would like to avoid…

Esben Skov Pedersen
- 4,437
- 2
- 32
- 46
2
votes
1 answer
Yaml based pipeline - setting the pool name at run time from the drop down
I have this yaml, how can I set the pool to the value selected in the drop down list? Obviously what I have now doesn't work. It complains that the template expression is not allowed in this context.
parameters:
- name: InstallNodeJS
…

Redline1111
- 131
- 2
- 11
2
votes
1 answer
Azure DevOps multistage pipeline YAML: how to checkout multiple repos?
My Azure DevOps pipeline uses yaml templates from two different repos, which is configured as following.
There is an application repository which has deployable application and one yaml file - the pipeline's "root" template
Templates Repository.…

lekso
- 1,731
- 3
- 24
- 46
1
vote
2 answers
Azure Yaml to Powerhell value being lost in parameter
I have an Azure Pipeline that is calling a PowerShell file using @AzureCLI@2 but at the top of the script I appear to be losing a value passed in which is the directory I want to load a file from.
If I perform this Task in Yaml:
- powershell:…

Raymondo
- 483
- 2
- 6
- 20
1
vote
2 answers
How to show all the parameters names as comma separated string and assign to One Varaible in YAML Azure Pipelines
How to show all the parameter's names as comma-separated strings (concatenated) and assign them to One Variable in YAML Azure so that i can use this variable in several places
i tried using
parameters:
- name: Var1
displayName: Testing
…

ksk
- 165
- 14
1
vote
1 answer
Use an output variable as a global variable in Azure yaml pipeline
I got an Azure yaml pipeline in which there's an input of a name of an output variable:
- task: QueryAzureDevOpsExtensionVersion@3
displayName: 'Query Extension Version'
inputs:
...
outputVariable: 'Task.Extension.Version'
...
I…

CodeMonkey
- 11,196
- 30
- 112
- 203
1
vote
1 answer
Azure DevOps Pipelines - calling yaml template from stages
I've been trying to implement as per this blog post
I have created a template yaml that received the environment name as a single parameter.
I'd like to call this from a yaml pipeline using stages. Hoping to reduce code duplication, with the idea…

Rob Bowman
- 7,632
- 22
- 93
- 200