Prompt user to continue in Azure DevOps pipeline - azure-devops

In Jenkins I can prompt the user to continue or cancel with the "input" directive in the pipeline definition.
Does Azure DevOps pipelines have this functionality or anything similar?
I am using a yaml file for the Azure DevOps pipeline.

Not in build definitions, no. In release definitions you can add a Serverless phase and put a Manual Intervention task.
Honestly, I can't imagine a scenario where you'd want a manual intervention in the middle of a build.

Related

Is there a way to export release pipleines to YAML in azure devops

Is there any way I can export a release pipeline in Azure devops to YAML?
Currently, Azure DevOps can't export a Release Pipeline to YAML.
But individual tasks within stages and jobs can be exported from release pipelines by clicking the “View YAML” button at the right upper side of a task.
This features is On Roadmap for implementation.
Support this feature # https://developercommunity.visualstudio.com/t/export-entire-azure-devops-buildrelease-pipelines/733456
References
https://developercommunity.visualstudio.com/t/export-a-release-pipeline-as-yaml/918911
Migrating existing (entire) Azure DevOps pipeline to YAML based pipelines (in bulk)

ADO YAML pipeline: deploy nightly OR when manual approval is given

We are currently switching over from Classic (UI) Azure Pipelines to YAML pipelines.
We would like to deploy a branch every night to an environment (when changes have occurred) and also be able to deploy to this environment manually. With the Classic pipelines it was easy to setup a scheduled deploy to an environment that could also be triggered manually when desired.
In the new YAML pipelines we currently use the "Business hours"
check to make sure the nightly deploy takes place, but we are unable to override the check when a manual deployment is needed.
Is there a way to setup a YAML pipeline where a deploy waits for either a manual approval or a scheduled trigger to occur?

How to add dependency between two release pipeline Azure DevOps

I have a scenario that i want to create a dependency in Release pipelines that once one pipeline completes its task then the next release pipeline should be triggered.
How can I achieve it.
How to add dependency between two release pipeline Azure DevOps
You could use the extension Trigger Azure DevOps Pipeline:
Trigger Azure DevOps Pipeline is an extension for triggering a Azure
DevOps Build or Release Pipeline.
Depending on your choice in the task, it will trigger a build or a
release pipeline.
To use the extension, an Azure DevOps API endpoint needs to be
created. The token used in the endpoint should be Personal Access
Token.

How to pass "settable at queue time" variable value from build pipeline to release pipeline

I have two pipelines on azure devops that do the following:
BUILD PIPELINE
Asks the user for the desire branch name and ticket id (from our ticketing system). Using two "settable at queue time" variables.
Gets the files from the specified branch name, builds the project and generate the artifacts that are later use by the RELEASE pipeline
RELEASE PIPELINE
This release pipeline is being triggered by the completion of the BUILD pipeline specified before. This pipeline completes the following tasks:
Creates new app service slot using an Azure CLI command task. In this task I need the ticket id, in order to create the slot with the corresponding ticket id as its name
Deploy the application to the created app service slot
I haven't found a way to pass to the RELEASE pipeline the ticket id the user entered when running the BUILD pipeline that triggered this RELEASE.
Unfortunately, there's no such a build-in function in Azure DevOps. While thanks to Martin Hinshelwood, we had an extension- Variable Tools for Azure DevOps Services to achieve the goal.
As you can see in the extension's doc, add a Variable Save Task in your build pipeline and a Variable Load Task in your release pipeline. After these two tasks, the variables are fully passed to your release.
Check below as reference:

Can I have a Teamcity build triggering an Azure Devops build job?

I'm migrating Teamcity to Azure Devops, as with our on-prem infrastructure. During that period we'll have both Teamcity and Azure Devops deployment for different infrastructures, but we want to reduce the amount of human intervention. So I was thinking in having either Teamcity triggering the Azure Devops build, or vice Versa. I think it would be easier to implement a powershell script that triggers the build on Azure Devops, instead the other way around because of compatibility issues, or version issues(old version).
Yes, you can use Azure Devops api to trigger the build. You would use this api call with appropriate body:
POST https://dev.azure.com/{organization}/{project}/_apis/build/builds?api-version=5.0
Reading: https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/queue?view=azure-devops-rest-5.0
I'm not familiar with Azure Devops powershell modules if any, but they might work as well.