ci: queue a scratch build using CT for PRs that change packages.#17778
ci: queue a scratch build using CT for PRs that change packages.#17778dmcilvaney wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a temporary/stopgap ADO pipeline that builds the components a pull request changes, run as a PR check. It exists because Control Tower cannot yet trigger builds from PRs, and GitHub-hosted PR check runners time out before slow packages (>5h) finish — running azldev component build in an ADO/OneBranch job lifts that ceiling.
The pipeline follows the repo's wrapper + raw-stages split: the wrapper owns the OneBranch wiring (NonOfficial variant, since it touches no production resources), and the raw stages template resolves the PR commit range from the merge commit's parents (HEAD^1/HEAD^2), computes the changed-component set with the shared compute_change_set.sh, and builds those components inside the azldev-runner container (mock hangs when run directly on the OneBranch host). The Dockerfile change forwards the host's internal Go proxy into the image build via a new GOPROXY build-arg.
Changes:
- New wrapper pipeline
pr-package-build.yml(OneBranch NonOfficial, 12h timeout, no service connection/variable group). - New raw stages template
pr-package-build-stages.yml(git unshallow + config normalization, host azldev install, container build, PR-range resolution with SHA validation, change-set compute, containerized build withmocksandbox flags, failure-only log dump). azldev-runner.Dockerfile: add optionalARG GOPROXYso callers behind an internal-only proxy can forward it togo install(empty/omitted = Go's built-in default; backward-compatible for the GitHub gates).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/ado/pr-package-build.yml |
New OneBranch wrapper entrypoint for the PR package-build check. |
.github/workflows/ado/templates/pr-package-build-stages.yml |
New OneBranch-agnostic stages template doing PR-range detection, change-set compute, and containerized build. |
.github/workflows/containers/azldev-runner.Dockerfile |
Adds an optional GOPROXY build-arg forwarded to go install. |
Notable review notes (see inline comments): two steps interpolate custom pipeline variables ($(sourceCommit), $(targetCommit), $(renderSetFile)) directly in the script body instead of binding them through the step env: block as the sibling pipelines do; the failure-only log-dump step can itself fail if the logs directory is absent; and the wrapper's "directly on the agent" wording doesn't match the containerized build design.
b3ebb6e to
88bc8d0
Compare
12fd072 to
f6a5159
Compare
345efc5 to
16c15f5
Compare
16c15f5 to
cd9a731
Compare
cd9a731 to
5f62ca7
Compare
5f62ca7 to
6011d04
Compare
6011d04 to
4a5542d
Compare
| for entry in entries: | ||
| if not isinstance(entry, dict): | ||
| continue | ||
| if entry.get("changeType") in build_change_types: | ||
| name = entry.get("component") | ||
| if isinstance(name, str) and name: | ||
| components.append(name) | ||
| change_type = entry.get("changeType") | ||
| if change_type not in known_change_types: | ||
| print( | ||
| f"##[error]--changed-components-file {path!s} has an unrecognized " | ||
| f"changeType {change_type!r} (known: {sorted(known_change_types)}); " | ||
| "refusing to guess the build set." | ||
| ) | ||
| raise SystemExit(1) | ||
| if change_type in build_change_types: | ||
| components.append(entry["component"]) |
Add a stopgap scratch build as a PR gate until CT's complete endpoint is ready for this work.