Skip to content

paketo-buildpacks/git

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Jul 12, 2024
Feb 2, 2022
Sep 2, 2022
Aug 3, 2022
Jun 27, 2024
Jul 26, 2021
Apr 6, 2021
Apr 6, 2021
Sep 1, 2022
Feb 28, 2022
Mar 2, 2022
Sep 1, 2022
Feb 28, 2022
Mar 2, 2022
Feb 17, 2022
Mar 2, 2022
Jul 16, 2024
Jul 16, 2024
Feb 2, 2022

Repository files navigation

Paketo Buildpack for Git

The Paketo Buildpack for Git is a Cloud Native Buildpack that retrieves git metadata and performs git operations.

Behavior

This buildpack uses the git dependency off of the stack that it is running on top of. The Git buildpack will only participate if there is a valid .git directory in the application source directory or if there a git-credentials service bindings present.

The buildpack will do the following:

  • Sets the REVISION environment variable, which is the commitish of HEAD, to be available for the build processes of other buildpacks and in the final running image.
  • Sets the org.opencontainers.image.revision label with the same commitish as the REVISION environment variable.
  • Creates custom git credential managers if it is provided with credentials through a binding.

Bindings

The buildpack optionally accepts the following bindings:

Type: git-credentials

Key Value Description
credentials <formated git credentials> The credentials file should have the following format to conform with the git credential structure.
context (optional) <url> The context is an optional pattern as defined by git. If a context is not provided then the credentials given in the binding will be the default credentials that git uses when authenticating. A given context can only be used once for any group of bindings, if a context is given by two separate bindings the build will fail.