Skip to content

feat(ir): add typed helper for CopyFiles@2#1017

Merged
jamesadevine merged 2 commits into
mainfrom
feat/ir-copy-files-v2-97ecf6efe614c1f2
Jun 15, 2026
Merged

feat(ir): add typed helper for CopyFiles@2#1017
jamesadevine merged 2 commits into
mainfrom
feat/ir-copy-files-v2-97ecf6efe614c1f2

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a typed factory function for CopyFiles@2 to the ado-aw IR.

Motivation

Previously, any code that needed to emit a CopyFiles@2 step had to hand-craft
TaskStep::new("CopyFiles@2", ...) with raw string inputs. This PR introduces a
well-typed copy_files_step() helper that makes required inputs explicit at the
call site and provides a clear, self-documenting API consistent with the patterns
already established for publish_test_results_step.

Changes

  • src/compile/ir/tasks.rs: copy_files_step(contents, target_folder) factory function with full doc comment covering all 8 optional inputs
  • src/compile/ir/tasks.rs: 3 unit tests covering required inputs, optional SourceFolder, and optional boolean flags

ADO Task Reference

Validation

  • cargo build --all-targets
  • cargo test — all 1856+ tests pass, 3 new tests for copy_files_step
  • cargo clippy --all-targets --all-features --workspace -- -D warnings

Created 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.com
  • spsprodweu4.vssps.visualstudio.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "spsprodeus21.vssps.visualstudio.com"
    - "spsprodweu4.vssps.visualstudio.com"

See Network Configuration for more information.

Generated by ADO Task IR Contributor · 642.2 AIC · ⌖ 18.1 AIC · ⊞ 35.3K ·

Adds copy_files_step() to src/compile/ir/tasks.rs — a typed factory
function for the CopyFiles@2 ADO built-in task.

Required inputs (Contents, TargetFolder) are positional parameters.
Optional inputs (SourceFolder, CleanTargetFolder, OverWrite,
flattenFolders, preserveTimestamp, retryCount, delayBetweenRetries,
ignoreMakeDirErrors) are applied via .with_input() on the returned
TaskStep, matching the established pattern.

Three unit tests cover: required inputs, SourceFolder via with_input,
and optional boolean flags.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine marked this pull request as ready for review June 15, 2026 06:42
@github-actions github-actions Bot mentioned this pull request Jun 15, 2026
@jamesadevine

Copy link
Copy Markdown
Collaborator

@copilot resolve merge conflicts

…-97ecf6efe614c1f2

# Conflicts:
#	src/compile/ir/tasks.rs

Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve merge conflicts

Done. Merged origin/main into this branch and resolved the conflict in src/compile/ir/tasks.rs by keeping both copy_files_step (this PR) and docker_installer_step (added on main via #1015). Commit: 50b3cf7.

Copilot AI requested a review from jamesadevine June 15, 2026 11:26
@jamesadevine jamesadevine merged commit f56b150 into main Jun 15, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants