feat(ir): add typed helpers for Docker@2#1086
Merged
jamesadevine merged 1 commit intoJun 18, 2026
Merged
Conversation
Add five factory functions for the Docker@2 ADO built-in task to src/compile/ir/tasks.rs: - docker_build_and_push_step() — buildAndPush (most common case) - docker_build_step() — build only - docker_push_step() — push only - docker_login_step() — login to a container registry - docker_logout_step() — logout from a container registry Each function follows the established pattern: the ADO command is baked into the factory, required/commonly-needed inputs are positional parameters where applicable, and optional inputs are applied via .with_input(…) on the returned TaskStep. Twelve unit tests are included covering default state, optional input chaining, and the login/logout symmetry invariant. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jamesadevine
approved these changes
Jun 18, 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.
Summary
Adds five typed factory functions for
Docker@2to the ado-aw IR (src/compile/ir/tasks.rs).Motivation
Previously, any code that needed to emit a
Docker@2pipeline step had to hand-craftTaskStep::new("Docker@2", ...)with raw string inputs. This PR introduces well-typedhelpers that make the command/mode boundary explicit and self-documenting, consistent with
the existing typed helpers for
DockerInstaller@0,CopyFiles@2,PowerShell@2, etc.Changes
src/compile/ir/tasks.rs: five new factory functions + twelve unit testsdocker_build_and_push_step()buildAndPushdocker_build_step()builddocker_push_step()pushdocker_login_step()logindocker_logout_step()logoutAll inputs except
command(baked into the factory) are applied via.with_input(...):ADO Task Reference
Docker@2command(required),containerRegistry,repository,Dockerfile,buildContext,tags,argumentsValidation
cargo build --all-targetscargo test— 2045+ tests pass (12 new Docker@2 tests)cargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.