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

Provide project source metadata from project.toml #1138

Closed
jromero opened this issue Apr 20, 2021 · 0 comments · Fixed by #1231
Closed

Provide project source metadata from project.toml #1138

jromero opened this issue Apr 20, 2021 · 0 comments · Fixed by #1231
Labels
epic/source-metadata Issues/PRs related to providing source metadata status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.

Comments

@jromero
Copy link
Member

jromero commented Apr 20, 2021

Description

As a buildpacks user, I'd like to have the source and version information from my project.toml file embedded as metadata in the final app image.

Proposed solution

Based on the spec, we should be able to provide <layers>/project-metadata.toml in this format which would be translated into the io.buildpacks.project.metadata label on the image.

This issue should be scoped to project.toml information.

Acceptance Criteria

General case
Given I have a `project.toml` with the following contents:
  [project]
  version = "1.0.2"
  source-url = "https://github.com/buildpacks/pack"
And I run `pack build my-app`
When I run the following command `docker inspect my-app | jq -r '.[0].Config.Labels["io.buildpacks.project.metadata"] | fromjson'`
Then I should see:
{
  "type": "project",
  "version": { "declared": "1.0.2" },
  "metadata": {
    "url": "https://github.com/buildpacks/pack"
  }
}

Additional context

This issue is part of an epic of work. The related issues may be see by filtering on epic/source-metadata.

@jromero jromero added type/enhancement Issue that requests a new feature or improvement. status/ready Issue ready to be worked on. epic/source-metadata Issues/PRs related to providing source metadata labels Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic/source-metadata Issues/PRs related to providing source metadata 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.

1 participant