feat(ir): add typed helper for DownloadPipelineArtifact@2#1063
Merged
jamesadevine merged 1 commit intoJun 17, 2026
Conversation
Adds `download_pipeline_artifact_step` to `src/compile/ir/tasks.rs`,
a typed factory function for the ADO `DownloadPipelineArtifact@2` task.
Previously, callers had to hand-craft `TaskStep::new("DownloadPipelineArtifact@2", ...)`
with raw string inputs (as seen in `src/tools/cache_memory/extension.rs`).
The new helper makes the required/optional input boundary explicit:
- `target_path` is the only positional (required) parameter.
- All other inputs — `artifact`, `source`, `project`, `pipeline`,
`runVersion`, `branchName`, `runId`, `tags`,
`allowPartiallySucceededBuilds`, `allowFailedBuilds`,
`preferTriggeringPipeline`, `patterns`, `itemPattern` — are
applied via the existing `.with_input(…)` builder on the returned
`TaskStep`.
Four unit tests cover:
- Required input only (default display name and single input)
- Filtering by artifact name
- Full "specific" source with branch/version/project inputs
- Glob pattern filtering
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
3 tasks
github-actions Bot
added a commit
that referenced
this pull request
Jun 17, 2026
…, DeleteFiles@1 helpers to ir.mdx Three typed helpers added in #1063, #1065, and #1071 were missing from the site docs. This patch: - Adds three rows to the Available helpers table in ir.mdx - Updates the tasks.rs module-layout bullet to list all 12 helpers - Updates the cross-reference sentence in extending.mdx to mention the three new entries Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 task
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
download_pipeline_artifact_steptosrc/compile/ir/tasks.rs— a typed factory function for the ADODownloadPipelineArtifact@2task.Motivation
DownloadPipelineArtifact@2is already used insrc/tools/cache_memory/extension.rsvia a hand-craftedTaskStep::new("DownloadPipelineArtifact@2", ...). Adding a typed helper to the centraltasks.rsmodule makes the required/optional input boundary explicit and gives future callers a clean, self-documenting API — consistent with the other helpers already in this module.Changes
src/compile/ir/tasks.rs:download_pipeline_artifact_step(target_path)factory function with full doc-comment listing all optional inputs and their defaults.source = "specific"with project/pipeline/branch/version inputsAPI
ADO Task Reference
DownloadPipelineArtifact@2targetPathartifact,patterns,source,project,pipeline,runVersion,branchName,runId,tags,allowPartiallySucceededBuilds,allowFailedBuilds,preferTriggeringPipeline,itemPatternValidation
cargo build --all-targetscargo testcargo 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.