ci: fix CFS template reference so it resolves against this repository - #1711
Merged
Conversation
All five pipelines pass their `steps` into an extends template that lives in another repository (MicroBuildTemplate or 1ESPipelineTemplates). A relative template path inside those steps is resolved against the file doing the including, which is the extends template, so `npm-cfs.yml` resolved to `/azure-pipelines/npm-cfs.yml` in MicroBuildTemplate: The 'stages' parameter is not a valid StageList. /.azure-pipelines/nightly.yml: File /azure-pipelines/npm-cfs.yml not found in repository .../MicroBuildTemplate branch refs/tags/release Qualify the reference with `@self` and an absolute repository path so it always resolves to this repository regardless of which template consumes the steps.
wenytang-ms
requested review from
chagong,
jdneo and
testforstephen
as code owners
July 28, 2026 02:39
chagong
approved these changes
Jul 28, 2026
This was referenced Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1708, which broke YAML compilation for every pipeline in
.azure-pipelines/.The failure
All five pipelines pass their
stepsinto anextendstemplate that lives in another repository. A relative template path is resolved against the file that does the including, and in this case that file is the extends template, not the pipeline. Sonpm-cfs.ymlwas looked up in the template repository:nightly.yml,rc.ymlazure-pipelines/MicroBuild.1ES.Official.yml@CustomPipelineTemplates/azure-pipelines/npm-cfs.ymlin MicroBuildTemplateci.yml,release.yml,release-nightly.ymlv1/1ES.*.PipelineTemplate.yml@1esPipelines/v1/npm-cfs.ymlin 1ESPipelineTemplatesThe fix
Qualify the reference with an absolute repository path and
@self, which the template documentation describes as the way to refer back to the extending pipeline's own repository:Verification
Compiled through the Azure DevOps preview API (
previewRun, no build queued) againstmainand against this branch:mainThe expanded YAML places the steps in the required order, for both the Windows MicroBuild jobs and the Linux release jobs:
1ES-CIcannot be previewed because the definition is currently disabled in the VSJava project, which is also why merging #1708 did not surface this. It carries the identical one line change.Still unverified, and only observable on a real run: whether the build identity can authenticate against the
vscjavafeed. All five definitions useprojectCollectionjob authorization, so the token belongs to the collection level build service, while the feed grantscontributorto the VSJava project level build service. A401onnpm installwould point there rather than at this change.