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

Add libpak-tools package bundle command which builds and packages a buildpack #23

Merged
merged 8 commits into from
Mar 4, 2024

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Jan 22, 2024

Summary

This command runs the build workflow for libcnb & libpak based buildpacks. It both compiles (libpak-tools package compile) and also packages the compiled buildpack into a buildpack image which is loaded into the Docker daemon.

It does not presently work for non-libcnb/libpak buildpacks because they have a slightly different build system, and specifically the way that the version number is set differs. This can be worked around, but requires a separate PR to libcnb to update the compilation command and how it handles setting the version number.

This tool is build off libpak v2, but should work with libpak v1 buildpacks as well.

Use Cases

An easy way to compile & package libcnb & libpak buildpacks.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@dmikusa dmikusa requested a review from a team as a code owner January 22, 2024 03:18
@dmikusa dmikusa added type:enhancement A general enhancement semver:minor A change requiring a minor version bump labels Jan 22, 2024
… buildpack

This command runs the build workflow for libcnb & libpak based buildpacks. It both compiles (`libpak-tools package compile`) and also packages the compiled buildpack into a buildpack image which is loaded into the Docker daemon.

It does not presently work for non-libcnb/libpak buildpacks because they have a slightly different build system, and specifically the way that the version number is set differs. This can be worked around, but requires a separate PR to libcnb to update the compilation command and how it handles setting the version number.

Signed-off-by: Daniel Mikusa <[email protected]>
Signed-off-by: Daniel Mikusa <[email protected]>
Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa
Copy link
Contributor Author

dmikusa commented Jan 22, 2024

Rebased.

I'm a little unsure about these go.work and go.work.sum files. That is something VScode suggested I do, but it didn't seem to cause issue if I did not do that either. I think it's necessary because of the tools/ sub-directory which has tools for running the linter and building. Maybe there's a better way to do this all? They are really just dev dependencies, but I'm not 100% sure how to do that in Go.

If you think I should look into this more before we merge, let me know.

@pivotal-david-osullivan

I had a look at these files and I read they're not intended to be checked in? golang/go#51941 (comment)

Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa
Copy link
Contributor Author

dmikusa commented Feb 27, 2024

@pivotal-david-osullivan Interesting. OK, removed. If it becomes annoying, we can add them later.

packager/buildpack.go Show resolved Hide resolved
packager/buildpack.go Outdated Show resolved Hide resolved
dmikusa and others added 2 commits March 1, 2024 08:34
Co-authored-by: Anthony Dahanne <[email protected]>
Signed-off-by: Daniel Mikusa <[email protected]>
@anthonydahanne anthonydahanne merged commit fa4ac5f into main Mar 4, 2024
4 checks passed
@anthonydahanne anthonydahanne deleted the add-pkg branch March 4, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants