We have a YAML release pipeline with multiple stages with below dependencies defined:
Example:
Stage: A
Stage: B
Stage: C
DependsOn:
- A
- B
Stage: D
Stage: E
Stage: F
DependsOn:
- D
- E
Issue:
I’m trying to trigger this YAML release from .NET tool which uses the Microsoft.Azure.Pipelines.WebApi from Azure DevOps SDK.
public int RunYamlPipeline(RunPipelineParameters runParam, int pipelineId)
{
VssConnection vssConnection = GetVssConnection();
PipelinesHttpClient pipelinesHttpClient = vssConnection.GetClient<PipelinesHttpClient>(Guid.NewGuid());
runParam.PreviewRun = false;
var result = pipelinesHttpClient.RunPipelineAsync(runParam, TfsSettings.TfsProjectName, pipelineId).Result
return result.Id;
}
In RunPipelineParameters, we are passing the StagesToSkip.
When I’m triggering the pipeline from this method with provided StagesToSkip as “StageA, Stage D”, observed that in the pipeline run, Stage C got skipped whereas Stage F ran to successful completion.
When triggered the same pipeline from Azure DevOps UI & unselected/skipped the stages as above, both stages C and F ran successfully.
Could someone pls help me understand why Stage C was skipped and Stage F ran when the pipeline was triggered from the tool?