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

Adds a Github buildpack loader #644

Merged
merged 1 commit into from
Apr 15, 2022
Merged

Adds a Github buildpack loader #644

merged 1 commit into from
Apr 15, 2022

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Apr 15, 2022

Summary

The draft-release job loads buildpack info from remote sources. Previously, this was loaded from images, but the images can be quite large at times so that is slow. This PR adds a buildpack loader that fetches buildpack metadata from Github.

In some cases, image names do not map directly to Github repositories so this PR also adds 'mapper' input parameters which are regular expressions that can be used to rewrite the image URI to a Github project. For example, mapper_input_1=|foo|bar| will map foo in the image URI to bar. The code will try both the original unmapped value, as well as the mapped value. If you set multiple mappers, they are all tried in order with the first match that results in a successful load of buildpack metadata being the one that gets used.

Use Cases

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).

The draft-release job loads buildpack info from remote sources. Previously, this was loaded from images, but the images can be quite large at times so that is slow. This PR adds a buildpack loader that fetches buildpack metadata from Github.

In some cases, image names do not map directly to Github repositories so this PR also adds 'mapper' input parameters which are regular expressions that can be used to rewrite the image URI to a Github project. For example, `mapper_input_1=|foo|bar|` will map foo in the image URI to bar. The code will try both the original unmapped value, as well as the mapped value. If you set multiple mappers, they are all tried in order with the first match that results in a successful load of buildpack metadata being the one that gets used.

Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa dmikusa added type:task A general task semver:patch A change requiring a patch version bump labels Apr 15, 2022
@dmikusa dmikusa requested a review from a team April 15, 2022 20:39
@dmikusa dmikusa merged commit 9bd639b into main Apr 15, 2022
@dmikusa dmikusa deleted the http-imgs branch April 15, 2022 20:42
This was referenced Apr 19, 2022
This was referenced Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant