-
Notifications
You must be signed in to change notification settings - Fork 671
ci: add Control Tower prcheck to the PR check + reusable step templates #17885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
PawelWMS
wants to merge
14
commits into
microsoft:4.0
Choose a base branch
from
PawelWMS:pawelwi/pr_check_sources_uploads
base: 4.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+803
−820
Draft
Changes from 10 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a0abedd
Saving AI comments.
PawelWMS 4c8dc5a
ci: rename compute_change_set.sh commit args to --from/--to
PawelWMS 7f4d36e
ci: inline compute_changed.sh into compute_change_set.sh
PawelWMS ab613e6
ci: extract common-steps into granular parameterized step templates
PawelWMS acd6951
ci: recompose common-steps from the granular step templates
PawelWMS 49c4753
ci: add Control Tower prcheck to the PR check and compose shared temp…
PawelWMS 782d66d
ci: rename PR package-build check to the generic pr-check-ct pipeline
PawelWMS d65da3e
ci: remove the standalone source-upload pipeline
PawelWMS 1d7e83d
ci: address PR #17885 review comments
PawelWMS a55d2f1
ci: apply variableGroup/CT_BUILD_REASON + variable conventions uniformly
PawelWMS 94b8223
ci: restore BUILD_REASON caveat; drop caller-origin comments from tem…
PawelWMS 4144371
ci: get-changes-info refactor + ADO pipeline convention rules
PawelWMS cb1059f
ci: fifth round of PR #17885 review comments
PawelWMS f2bfe9c
ci: audit PR against ADO instructions -- unmap auto-exposed predefine…
PawelWMS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,9 +5,9 @@ | |
| # OneBranch-coupled knobs as parameters. The wrapper at | ||
| # .github/workflows/ado/package-build.yml supplies concrete values. | ||
| # | ||
| # The setup + change-detection + validation steps are shared with the | ||
| # source-upload pipeline via templates/steps/common-steps.yml; this template | ||
| # appends only the package-build-specific Control Tower call. | ||
| # The setup + change-detection + validation steps come from the shared | ||
| # templates/steps/common-steps.yml (composed from templates/steps/*); this | ||
| # template appends only the package-build-specific Control Tower call. | ||
|
|
||
| parameters: | ||
| - name: outputDirectory | ||
|
|
@@ -21,7 +21,11 @@ parameters: | |
| default: linux | ||
| - name: serviceConnection | ||
| type: string | ||
| - name: variableGroup | ||
| # Control Tower API audience + base URL, passed by the wrapper (which owns the | ||
| # variable group / env-specific values). The template stays group-agnostic. | ||
| - name: apiAudience | ||
| type: string | ||
| - name: apiBaseAFDUrl | ||
| type: string | ||
| - name: timeoutInMinutes | ||
| type: number | ||
|
|
@@ -47,13 +51,20 @@ stages: | |
| pool: | ||
| type: ${{ parameters.poolType }} | ||
| variables: | ||
| - group: ${{ parameters.variableGroup }} | ||
| - name: ob_outputDirectory | ||
| value: ${{ parameters.outputDirectory }} | ||
| - name: ob_artifactBaseName | ||
| value: ${{ parameters.artifactBaseName }} | ||
| - name: LinuxContainerImage | ||
| value: ${{ parameters.containerImage }} | ||
| # Runtime-consumed params surfaced as variables so a caller may pass | ||
| # runtime $[ ] / $(macro) expressions (evaluated here, not inline). | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove comment, don't explain the calling convention in every YAML. Apply globally to all changes in this PR. If this approach is missing from AI instruction - update them. |
||
| - name: apiAudience | ||
| value: ${{ parameters.apiAudience }} | ||
| - name: apiBaseAFDUrl | ||
| value: ${{ parameters.apiBaseAFDUrl }} | ||
| - name: packageTarget | ||
| value: ${{ parameters.packageTarget }} | ||
| steps: | ||
| # Shared setup + change detection + validation (PipAuthenticate, | ||
| # install deps, determine commit range, verify locks, prepare change | ||
|
|
@@ -73,17 +84,16 @@ stages: | |
| python3 scripts/ci/control-tower/run_package_build.py \ | ||
| --api-audience "$API_AUDIENCE" \ | ||
| --api-base-url "$API_BASE_URL" \ | ||
| --build-reason "$CT_BUILD_REASON" \ | ||
| --build-reason "$BUILD_REASON" \ | ||
| --changed-components-file "$CHANGED_COMPONENTS_FILE" \ | ||
| --package-target "${{ parameters.packageTarget }}" \ | ||
| --package-target "$PACKAGE_TARGET" \ | ||
| --official-build \ | ||
| --commit-sha "$SOURCE_COMMIT" \ | ||
| --repo-uri "$UPSTREAM_REPO_URL" | ||
| env: | ||
| API_AUDIENCE: $(ApiAudience) | ||
| API_BASE_URL: $(ApiBaseAFDUrl) | ||
| # Non-reserved name: an `env:` override of the reserved BUILD_REASON var is silently ignored by the agent. | ||
| CT_BUILD_REASON: $(Build.Reason) | ||
| API_AUDIENCE: $(apiAudience) | ||
| API_BASE_URL: $(apiBaseAFDUrl) | ||
| PACKAGE_TARGET: $(packageTarget) | ||
| CHANGED_COMPONENTS_FILE: $(changedComponentsFile) | ||
| SOURCE_COMMIT: $(sourceCommit) | ||
| UPSTREAM_REPO_URL: $(Build.Repository.Uri) | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment - template has no knowledge of the origin (variable group at the moment) of the parameters. This comment can easily go stale. Remove such assumptions of caller's intentions from all templates and scripts you've touched in this PR.