We have a build pipeline that gets triggered for a CI build that only publishes artifacts when the build succeeds and is not a PR build nor a Scheduled build.
We only want the release pipeline defined below to run when the build pipeline publishes an artifact. If it doesn't publish an artifact the triggered release pipeline fails.
My understanding that I believe is from reading docs.microsoft.com was that if the resource doesn't produce an artifact it won't trigger a resource trigger (I currently can't find support for that claim). We just added a scheduled nightly build for running some long running tests to the build pipeline. As configured the conditions on the publish tasks prevented an artifact from being created but the release pipeline is still being triggered and results in a failure.
trigger: none
pr: none
resources:
pipelines:
- pipeline: API-Deployment
source: API-Build
trigger:
branches:
include:
- refs/heads/main
How do we prevent the release pipeline from running when the build pipeline is triggered by a scheduled or a PR build? Or how can we inspect to find out whether or not the triggering build produced an artifact so that we can prevent stages/jobs/tasks from running and failing when an artifact doesn't exist?
