[release/9.0] Remove OneLoc PAT dependencies - #17457
Conversation
Import the legacy variable group only when the Ceapex or GitHub PAT fallback can be selected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: bc4e1c74-f3b4-4965-932e-5e63cff7e877
There was a problem hiding this comment.
🟢 Approval recommended
Pull request overview
This PR backports the OneLoc legacy variable-group cleanup to release/9.0 by conditionally attaching the OneLocBuildVariables group only when PAT-based fallback auth can be used, avoiding unnecessary legacy PAT hydration when both Ceapex WIF and GitHub App credentials are selected.
Changes:
- Gate
OneLocBuildVariablesvariable group attachment behind a template expression that detects when Ceapex PAT or GitHub PAT fallback may be needed. - Preserve legacy PAT availability for non-
internal/DevDivprojects and for opt-out/unsupported GitHub App scenarios.
File summaries
| File | Description |
|---|---|
| eng/common/core-templates/job/onelocbuild.yml | Conditionally includes the legacy OneLoc variable group only when PAT fallback paths are possible, reducing unnecessary secret downloads. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@mmitche please take a look! |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new project-scope guard uses a non-standard template expression function spelling (notIn) that deviates from established repo usage and could cause template evaluation failures.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
| steps: | ||
| - ${{ if eq(parameters.is1ESPipeline, '') }}: | ||
| - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error | ||
| - ${{ if notIn(variables['System.TeamProject'], 'internal', 'DevDiv') }}: |
There was a problem hiding this comment.
🟡 Changes recommended
The updated template uses an unsupported notIn(...) Azure Pipelines template-expression function, which will break template expansion until corrected.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
| steps: | ||
| - ${{ if eq(parameters.is1ESPipeline, '') }}: | ||
| - 'Illegal entry point, is1ESPipeline is not defined. Repository yaml should not directly reference templates in core-templates folder.': error | ||
| - ${{ if notIn(variables['System.TeamProject'], 'internal', 'DevDiv') }}: |
Summary
OneLocBuildVariablesvariable group torelease/9.0Backport of the main cleanup for AB#10151 and AB#12331.