0

This (nearly empty) Azure DevOps pipeline yaml fails when initiated because of a PR from another repo's Build Validation:

azure-pipelines.yaml of "App A":

pool:
  name: default

steps:
- bash: |
    echo "##[debug]Because"
  displayName: 'log stuff'

Build Validation

Normal build validation of a pipeline pointing at the same repo works ("Common Gated" as this is a policy for the "Common" repo), but running App A's pipeline as a Build Validation, it errors out immediately with little detail. App A's pipeline works fine when triggered manually. (App B is all exactly the same)

"View 3 Checks"

An error occurred while loading the YAML build pipeline. Object reference not set to an instance of an object.

An error occurred while loading the YAML build pipeline. Object reference not set to an instance of an object.
2125292

In case I'm at the wrong tree, what I'm trying to do is a gated build of both App A and App B when attempting to update Common's main branch. App A and App B each have git-submodules of Common embedded in them - an experiment to avoid publishing packages and versioning of Common without sacrificing much overall code/build stability. Ultimately, I think I'll need to switch the gated build's Common submodule branch to $(System.PullRequest.SourceBranch) before this check will make any sense, but I'm not that far along. Anyone succeeded in such a setup?

1 Answer 1

0

That is possible if your yaml does not exist in the source or target gat branch. The build tries to run but can not fetch the yaml in the downloaded source code. If you create your yaml only on master ... do not forget to merge it through other branches.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.