ci: use 1ES pipelineArtifact output in ext-azure-ai-agents-live#8998
ci: use 1ES pipelineArtifact output in ext-azure-ai-agents-live#8998vhvb1989 wants to merge 3 commits into
Conversation
The 1ES pipeline template (via 1es-redirect.yml) forbids the raw PublishPipelineArtifact@1 task and requires artifacts to be declared as job-level outputs using `output: pipelineArtifact`. Move the test-log publish into templateContext.outputs, preserving the always() condition. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the ext-azure-ai-agents-live Azure DevOps pipeline to comply with 1ES pipeline template rules by declaring the test-log artifact as a job-level pipelineArtifact output instead of using a raw PublishPipelineArtifact@1 step.
Changes:
- Adds
templateContext.outputson theTier2job to publish$(Build.ArtifactStagingDirectory)as apipelineArtifactwithcondition: always(). - Removes the forbidden
PublishPipelineArtifact@1task from the jobsteps:.
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
danieljurek
left a comment
There was a problem hiding this comment.
Builds won't succeed on retry with the current naming convention, but this will function as written
…lisions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio
left a comment
There was a problem hiding this comment.
Re-approving after the JobAttempt fix. The $(System.JobAttempt) suffix correctly prevents artifact name collisions across job re-runs within the same build.
RickWinter
left a comment
There was a problem hiding this comment.
This moves the tier2 live-log publish out of a raw PublishPipelineArtifact@1 step and into a job-level templateContext.outputs block so the pipeline passes 1ES template validation. The approach is correct and matches the pattern the other 1ES pipelines in the repo already use. condition: always() is preserved, so failure-path log publishing is retained, and targetPath/artifactName map cleanly to path/artifact.
The one behavior delta is the artifact name gaining $(System.JobAttempt), which is an improvement (re-running a failed job no longer collides on the artifact name), not a regression. No blockers. Disposition: COMMENT.
jongio
left a comment
There was a problem hiding this comment.
Test infrastructure updates look solid. The switch from string matching to proper YAML struct parsing in hasProjectManifest is the right call for handling the unified azure.yaml format. initOutputDiagnostics is well-bounded (80 entries, depth 3) for CI log clarity.
Fixes #9004
Problem
Running the
ext-azure-ai-agents-livepipeline fails at template expansion:Cause
eng/pipelines/ext-azure-ai-agents-live.ymlextends1es-redirect.yml, so it runs through the 1ES pipeline template, which forbids callingPublishPipelineArtifact@1as a plaintask:step. 1ES requires artifacts to be declared as job-level outputs viatemplateContext.outputsusingoutput: pipelineArtifact(the same pattern already used by every other 1ES pipeline in the repo, e.g.eng/pipelines/templates/jobs/build-cli.yml).Fix
Move the test-log publish out of
steps:and into atemplateContext.outputsblock on theTier2job.conditionis still supported, soalways()continues to publish logs even when the live run fails. Key mappings:targetPath→path,artifactName→artifact.No behavior change beyond compliance — logs are published to the same artifact name.