Skip to content

Organize Generated Artifacts Into Per-Package folders #11397

Closed
@scbedd

Description

After building, the artifacts available to the rest of the build are organized like this:
image

Which necessitates a pre-step when handling the artifacts during release.

Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}
New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace)
$underscorePrefix = "${{artifact.name}}"
$dashPrefix = "${{artifact.name}}".Replace("_", "-")
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$dashPrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/$underscorePrefix-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}

This is useless duplicate work on the release side.

If we instead organize the artifacts like

artifactRoot/
   packages/
      {artifact.safeName}/<generated files>

This issue covers

  • Add post-build step to organize the artifacts like above
  • Update release steps to leverage the new artifact name

Edit, additional requirement from confusion breaking a release:

  • Make certain artifactname can forgive _ versus -. This PR highlights why.

Metadata

Assignees

Labels

Central-EngSysThis issue is owned by the Engineering System team.EngSysThis issue is impacting the engineering system.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions