dyn365-ce-vsts-tasks icon indicating copy to clipboard operation
dyn365-ce-vsts-tasks copied to clipboard

Get Online Instance By Name : Could it be possible to not throw error when instance does not exist?

Open MscrmTools opened this issue 4 years ago • 3 comments

Maybe I'm not using it correctly but I would like to check if an instance exists in a build pipeline to avoid trying to create it using Provision Instance task.

The build will trigger on any change of a branch. So, first time, it does not find the instance, create it and deploy the unmanaged solution. Next updates, the branch exists, so the Provision instance task is not run. Problem is : For the first time, the instance does not exist and the build fails.

I would like an option to not fail if the instance does not exist

Does it make sense?

MscrmTools avatar Jul 23 '20 13:07 MscrmTools

task: mark continue on error. next task: Run this task = Only when a previous task has failed (negative path) next task: Run this task = Even if a previous task has failed, unless the build was canceled (positive path)

craig-lund avatar Jul 31 '20 16:07 craig-lund

It does not change the result that the build is considered as failed

MscrmTools avatar Aug 01 '20 06:08 MscrmTools

@MscrmTools you could process some of the outputs get instance task and execute the following tasks based on that.

WaelHamze avatar Nov 16 '20 19:11 WaelHamze