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
5
votes
1 answer
Azure Pipeline with Scheduled trigger triggers on every commit
I want a pipeline to trigger every six months. It s a compliance requirement for code scanning.
So I created a schedule:
schedules:
- cron: "0 0 1 */6 *"
branches:
include:
- master
always: true
But this pipeline is…

Tauqir
- 369
- 1
- 5
- 15
5
votes
2 answers
Azure DevOps pipeline kubectl task command: rollout unavailable
Hi I am trying to implement the rollback for Kubernetes deployments using this guide, https://adrianbumbas.com/rollback-kubernetes-deployments-with-azure-devops-pipelines/. However, when adding a new kubectl task into the pipeline, I was unable to…

Richard Rodjues
- 207
- 1
- 6
- 23
5
votes
2 answers
lower() function does not seem to work in Azure DevOps YAML pipeline
I'm trying to use the lower() function in a YAML template, but do not understand the behavior.
I've a variable group named Infra.Environment.ShortName with the value "Dev".
In my YAML template, I've defined a variable from a variable group:
…

user14098243
- 131
- 1
- 4
5
votes
1 answer
Is there a way to create an array in powershell and loop through it in Azure DevOps YAML?
I'm trying to create a pipeline for our database deployments against 140+ databases on 10 instances. Our IT team has mentioned that there are situations where the databases will be moved from one instance to another for load balancing. So I can't…

AndyV
- 51
- 1
- 5
5
votes
2 answers
Efficient way to share node_modules between different Azure Pipeline jobs
My project is a node project using yarn to manage npm dependencies.
In my CI azure pipeline, I have multiple jobs, all of which require running yarn to install npm dependencies. Because the number of dependencies is quite large, it takes almost 4…

superkinhluan
- 733
- 7
- 23
5
votes
2 answers
how can use template for parameters in azure pipelines
I'm using an extend template and i want to use another template in this just for parameters.
But i'm not able to and i'm not sure if the syntax is wrong.
getting this error :
/templatetest.yml (Line: 8, Col: 1): Unexpected value 'template'
#This is…

Sanjeev
- 415
- 5
- 17
5
votes
4 answers
Azure Pipeline error: template file not found in repository
I am trying to use 2 repositories on the same pipeline. One repository contains source code and the other has templates.
The azure-pipeline.yml of repository source code looks like this:
pool: alm-aws-pool
resources:
repositories:
-…

Dàniel Hernández
- 307
- 1
- 3
- 14
5
votes
1 answer
Azure Pipelines YAML - error when using variable group for "Deploy Web App" azureSubscription input
I defined variable groups for my various environments with a variable board.subscription which specifies the Azure Service Connection to be used in WebApp deployment.
These variable groups are referenced for the deployment jobs:
name:…

Kai Walter
- 3,485
- 2
- 32
- 62
5
votes
1 answer
With azure pipelines and poetry, is there any way to avoid sourcing ~/.poetry/env in every script?
I currently use the script below to build my package and publish it to a private Azure Artifacts feed.
In every script, I have to run the line source $HOME/.poetry/env or it cannot find the poetry command.
Is there a way to remove this…

multipitch
- 189
- 2
- 11
5
votes
1 answer
How to update version of maven artifact on Azure pipeline?
I am using Azure pipelines (the .yml type) to build and publish an artifact from a Maven project.
Right now all I can do is publish artifacts with the exact version number that is defined in the project's pom.xml file, which is 1.0-SNAPSHOT
I would…

jcm
- 51
- 1
- 6
5
votes
1 answer
Azure Devops pipeline Yaml 'Toggle Block Comment' not working
In the Azure DevOps pipeline YAML editor, these options do nothing. This menu is available if you right-click on the editor and choose 'command palette' or press F1.

Blue Clouds
- 7,295
- 4
- 71
- 112
4
votes
0 answers
Running CosmosDB Emulator in Azure Pipeline is very slow
For integration tests on a Azure Devops Pipeline we start the CosmosDbEmulator with the following task (just before dotnet test).
- task: PowerShell@2
displayName: "Starting Cosmos Emulator for Integration Tests"
inputs:
targetType:…

Fabian Bigler
- 10,403
- 6
- 47
- 70
4
votes
1 answer
Azure DevOps Pipelines - How do I get the list of all tasks in a stage?
As part of a validater script that needs to be run as part of a pipeline, I want to find the list of tasks that will be executed as part of the current stage.
Something like a pipeline variable or something that I can use to check the existence of a…

Harivardhan Pyaram
- 51
- 6
4
votes
1 answer
Azure Pipelines: Where is the output of my script?
I tried to build my Angular 13 app on a self-hosted agent and created the following YAML snippet for this:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '14.x'
- script: |
npm install -g @angular/cli
npm…

David Mason
- 915
- 1
- 9
- 27
4
votes
2 answers
Azure DevOps Conditional for Multiple values
I have been following this Microsoft doc and created a release pipeline in YAML, all works fine.
I have a conditional step that works fine as well:
- ${{ if contains(parameters.environment, 'PROD') }}:
Now requirement changed a bit, and the same…

Maytham Fahmi
- 31,138
- 14
- 118
- 137