Organize Generated Artifacts Into Per-Package folders #11397
Closed
Description
After building, the artifacts available to the rest of the build are organized like this:
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.