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 buildpack name to buildpack and builder metadata #1119

Merged
merged 6 commits into from
Apr 6, 2021

Conversation

sambhav
Copy link
Member

@sambhav sambhav commented Mar 29, 2021

Signed-off-by: Sambhav Kothari [email protected]

Summary

Adds the name to buildpackage, builder and build layers

Notes -

I ended up having to change some acceptance manager logic to get the previous builder tests to pass. New releases of pack include the build number and the git commit in the version which was causing the override files to not work as expected. As a result I had to add a sanitizer to the version string and use that for overrides. The large number of lines changed is due to the 0.18 builder outputs.

Output

Before

$ git clone https://github.com/buildpacks/samples
$ cd buildpacks/hello-world
$ pack buildpack package sample-before
$ pack inspect-buildpack sample-before
Inspecting buildpack: sample-before
LOCAL IMAGE:

Stacks:
  ID: io.buildpacks.samples.stacks.bionic
    Mixins:
      (omitted)
  ID: io.buildpacks.samples.stacks.alpine
    Mixins:
      (omitted)
  ID: io.buildpacks.stacks.bionic
    Mixins:
      (omitted)

Buildpacks:
  ID                         VERSION        HOMEPAGE
  samples/hello-world        0.0.1          https://github.com/buildpacks/samples/tree/main/buildpacks/hello-world

Detection Order:
 └ Group #1:

After

$ git clone https://github.com/buildpacks/samples
$ cd buildpacks/hello-world
$ pack buildpack package sample-after
$ pack inspect-buildpack sample-after 
Inspecting buildpack: sample-after

LOCAL IMAGE:

Stacks:
  ID: io.buildpacks.samples.stacks.bionic
    Mixins:
      (omitted)
  ID: io.buildpacks.samples.stacks.alpine
    Mixins:
      (omitted)
  ID: io.buildpacks.stacks.bionic
    Mixins:
      (omitted)

Buildpacks:
  ID                         NAME                         VERSION        HOMEPAGE
  samples/hello-world        Hello World Buildpack        0.0.1          https://github.com/buildpacks/samples/tree/main/buildpacks/hello-world

Detection Order:
 └ Group #1:
    └ samples/[email protected]    

Documentation

  • Should this change be documented?
    • Yes, see #___
    • No

Related

Resolves #994

@sambhav sambhav requested a review from a team as a code owner March 29, 2021 22:08
@github-actions github-actions bot added type/chore Issue that requests non-user facing changes. type/enhancement Issue that requests a new feature or improvement. labels Mar 29, 2021
@github-actions github-actions bot added this to the 0.18.0 milestone Mar 29, 2021
@sambhav sambhav marked this pull request as draft March 29, 2021 22:14
@jromero jromero modified the milestones: 0.18.0, 0.19.0 Mar 30, 2021
@sambhav sambhav marked this pull request as ready for review March 30, 2021 21:40
Copy link
Member

@dfreilich dfreilich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 🏅 . The percentage of LOC changed to test files changed is wild, and is definitely food for thought. Thanks for taking this all the way!

@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #1119 (5e5d167) into main (d2d29c1) will increase coverage by 0.15%.
The diff coverage is 66.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1119      +/-   ##
==========================================
+ Coverage   80.55%   80.70%   +0.15%     
==========================================
  Files         136      136              
  Lines        8257     8259       +2     
==========================================
+ Hits         6651     6665      +14     
+ Misses       1176     1164      -12     
  Partials      430      430              
Flag Coverage Δ
os_linux 80.14% <66.67%> (+0.11%) ⬆️
os_macos 77.71% <66.67%> (+0.16%) ⬆️
os_windows 80.62% <66.67%> (+0.16%) ⬆️
unit 80.19% <66.67%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@dfreilich dfreilich removed the type/chore Issue that requests non-user facing changes. label Apr 6, 2021
@dfreilich dfreilich merged commit b364ad3 into buildpacks:main Apr 6, 2021
@sambhav sambhav deleted the name branch April 6, 2021 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add buildpack name to buildpack and builder metadata
3 participants