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 #994

Closed
ekcasey opened this issue Dec 18, 2020 · 0 comments · Fixed by #1119
Closed

Add buildpack name to buildpack and builder metadata #994

ekcasey opened this issue Dec 18, 2020 · 0 comments · Fixed by #1119
Labels
status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.
Milestone

Comments

@ekcasey
Copy link
Member

ekcasey commented Dec 18, 2020

Description

In buildpack.toml there is an optional name field that contains the human-readable name of a buildpack. This is useful information for certain types of autmation (for example, generating release notes for a builder or buildpack). This information should be available in a label on buildpackage and builder images.

Proposed solution

Buildpackage Metadata

Add name to io.buildpacks.buildpackage.metadata on buildpack images

{
  "id": "paketo-buildpacks/java",
  "name": "Paketo Java Buildpack",
  "version": "4.6.0",
  "homepage": "https://github.com/paketo-buildpacks/java",
  "stacks": [
    {
      "id": "io.buildpacks.stacks.bionic"
    }
  ]
}

Buildpack Layers Metadata

Add name to each buildpack in io.buildpacks.buildpack.layers

{
  "paketo-buildpacks/apache-tomcat": {
    "3.1.0": {
      "api": "0.4",
      "name": "Paketo Apache Tomcat Buildpack",
      "stacks": [
        {
          "id": "io.buildpacks.stacks.bionic"
        }
      ],
      "layerDiffID": "sha256:7b92482a317633951cde946c993546de25ac509b036f99b5b020eb4a02079d70",
      "homepage": "https://github.com/paketo-buildpacks/apache-tomcat"
    }
  },
  "paketo-buildpacks/azure-application-insights": {
    "3.0.0": {
      "api": "0.4",
      "name": "Paketo Azure Application Insights Buildpack",
      "stacks": [
        {
          "id": "io.buildpacks.stacks.bionic"
        }
      ],
      "layerDiffID": "sha256:dcc047af83b728bfe085efc4834f1d6e51c6e5d706c70b47a59efac8ec5e7151",
      "homepage": "https://github.com/paketo-buildpacks/azure-application-insights"
    }
  },
  {} # etc.
}

Builder Metadata

Add name to each buildpack in io.buildpacks.builder.metadata

{
  "description": "Ubuntu bionic base image with buildpacks for Java, .NET Core, NodeJS, Go, Ruby, NGINX and Procfile",
  "buildpacks": [
    {
      "id": "paketo-buildpacks/dotnet-core",
      "name": "Paketo .NET Core Buildpack",
      "version": "0.0.9",
      "homepage": "https://github.com/paketo-buildpacks/dotnet-core"
    },
    {
      "id": "paketo-buildpacks/dotnet-core-sdk",
      "name": "Paketo .NET SDK Buildpack",
      "version": "0.0.196",
      "homepage": "https://github.com/paketo-buildpacks/dotnet-core-sdk"
    },
    {} # etc.
    ],
    "stack": {},
    "lifecycle": {},
    "createdBy": {}
}

Describe alternatives you've considered

Maybe if the name is present in io.buildpacks.buildpack.layers we don't need it in io.buildpacks.buildpackage.metadata or io.buildpacks.builder.metadata? I couldn't quite figure out the organizing principle for what we normalized or denormalized where. I decided name was most like homepage which we repeat in each of these labels.

Additional context

@ekcasey ekcasey added type/enhancement Issue that requests a new feature or improvement. status/triage Issue or PR that requires contributor attention. labels Dec 18, 2020
@dfreilich dfreilich added this to the 0.17.0 milestone Dec 21, 2020
@dfreilich dfreilich modified the milestones: 0.17.0, 0.18.0 Jan 26, 2021
@jromero jromero added status/ready Issue ready to be worked on. and removed status/triage Issue or PR that requires contributor attention. labels Mar 3, 2021
@jromero jromero modified the milestones: 0.18.0, 0.19.0 Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants