tfstfsbuildazure-devops-server-2019

tfs 2019 Pipeline Builds Triggers only trigger if a new check-in has happened


In on prem TFS 2019, I have builds that we have triggers to happen on a schedule meaning they always build at specified times during the day. What I would like to do is to not start a build if a check-in hasn't happened since the last build ran. If no check-in has happened, we really don't have a reason to build and push new code since the code hasn't changed.


Solution

  • By default, your pipeline does not run as scheduled if there have been no code changes since the last scheduled run.

    Make sure you select Only schedule builds if the source or pipeline has changed in your Pipeline:

    enter image description here

    Or not use the always keyword in YAML build:

    https://learn.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml#running-even-when-there-are-no-code-changes