Fix for Azure DevOps deployment to an environment stuck in "Job is pending" state
Issue I had an Azure DevOps YAML based pipeline that had been working but was now getting stuck with the message “Job is pending…” when trying to start a stage in which there is a deployment to an environment. Looking at the logs and Azure DevOps UI it was not obvious what the issue was. Solution Turns out it was due to environment checks and approvals. There was a branch policy on the environment. This was set to only allow use of Azure DevOps Templates on a given branch. The edit that had been done to the YAML meant it was trying to extend a template in a branch that was not in the approved list. ...