Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organize Generated Artifacts Into Per-Package folders #11397

Closed
3 tasks
scbedd opened this issue May 12, 2020 · 3 comments · Fixed by #16187
Closed
3 tasks

Organize Generated Artifacts Into Per-Package folders #11397

scbedd opened this issue May 12, 2020 · 3 comments · Fixed by #16187
Assignees
Labels
Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Comments

@scbedd
Copy link
Member

scbedd commented May 12, 2020

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.
@scbedd scbedd added the EngSys This issue is impacting the engineering system. label May 12, 2020
@scbedd scbedd assigned scbedd and unassigned scbedd May 12, 2020
@scbedd scbedd changed the title Add Post-Build Step That Organizes Artifacts By ArtifactName Organizes Artifacts By ArtifactName May 13, 2020
@scbedd scbedd changed the title Organizes Artifacts By ArtifactName Organize Generated Artifacts Into Per-Package folders May 13, 2020
@weshaggard
Copy link
Member

Add post-build step to organize the artifacts like above

If possible we should do it as part of the packaging step itself and have the output going directly into a separate folder but if that isn't easy then we should do this reorganization as post-build step but during the build/package pipeline job. No need for us add another job to download, organize, and then re-upload.

@scbedd
Copy link
Member Author

scbedd commented Jun 4, 2020

When I say post-build I mean post-the-step-that-actually-builds. It doesn't necessarily mean "download from artifact store, reupload after organizing".

Not only that, but I think you're right in that there is still a possibility of issues. I also would prefer to generate them into the appropriate location. The piece I'm a little bit uncertain of is how I'm going to get that input into the build_packages.py without horrendously messing something up if there is no artifact configured.

@lmazuel lmazuel added the Central-EngSys This issue is owned by the Engineering System team. label Oct 9, 2020
@scbedd scbedd linked a pull request Feb 23, 2021 that will close this issue
@weshaggard
Copy link
Member

@scbedd did you have another issue opened to track the conversation we had in https://github.com/Azure/azure-sdk-for-python/pull/16187/files#r569034123?

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants