How to refer previous task and stop the build in azure devops if there is no new data to publish an artifact

Devops-bee

Getsolution.exe will give New data available or no new data available, if new data available then next jobs should be executed else nothing should be executed. How should i do it? (i am working on classic editor)

example: i have set of tasks, consider 4 tasks:

task-1: builds the solution

task-2: runs the Getstatus.exe which get the status of data available or no data available

task-3: i should be able to use the above task and make a condition/use some api query and to proceed to publish an artifact if data is available if not cleanly break out of the task and stop the build. it Shouldn't proceed to publish artifact or move to the next available task

task-4:publish artifact

Krzysztof Madej

First what you need is to set a variable in your task where you run Getstatus.exe:

enter image description here

and then set condition in next tasks:

enter image description here

If you set doThing to different valu than Yes you will get this:

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Is it possible to conditionally set the artifact name in my Azure DevOps build pipeline "publish artifact" task?

How to publish docker image as an artifact in azure devops

Publish build artifact through build.cake instead of Azure Devops

What is this cryptic artifact name created by the Publish Symbols Azure DevOps task?

azure devops: copy and publish build artifacts - rename artifact by buildnumber

How to publish specific files using Publish Build Artifact Task

How to publish artifact into Azure Artifact

File pattern for Publish Pipeline Artifact in Azure DevOps

Publish latest build artifact from "LOCAL" Jenkins to Azure DevOps Release Pipeline?

Azure DevOps PublishTestResults task -- how to publish results if tests fail

How can an Azure DevOps task use the Output of a previous Azure DevOps task

When using Azure DevOps CI/CD for a Linux web app how can I zip and publish the build artifact as a zip file only instead of copying to directory

How to publish build output to network share with Azure Devops

where is Azure DevOps build artifact stored

Azure DevOps: How to retrieve a build artifact from build Azure Pipeline from a PowerShell Script in Release Pipeline?

Azure DevOps Build Task: create a zip with contents identical to Visual Studio Publish

How to know the previous step result in Azure DevOps build Pipe line?

how to rollback to previous build in azure devops using yaml

How to copy an Azure DevOps build artifact to a Docker image build in the same pipeline?

Publish build artifact task results 'path does not exist' error

How to stop build agent from waiting in the pipeline process in Azure devops

Publish custom maven artifact/package (*.jar) to Azure artifact using azure DevOps pipeline

Azure DevOps YAML how to being notified about new task version

Azure DevOps Release Task to deliberately stop the Release

How can I inject Azure DevOps pipeline run number in a build artifact file?

How to download an artifact in Azure DevOps artifacts

How to specify Artifact version name in Azure DevOps?

How to build the Unit Test project along with the 'Visual Studio Build' task in CI build Azure DevOps

Azure DevOps: How to avoid a build on new branch creation

TOP Ranking

HotTag

Archive