Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Allows using Heroku buildpacks from private repositories

License

Notifications You must be signed in to change notification settings

katana-scm/heroku-private-buildpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

heroku-private-buildpack

This supports loading a build pack from a private git repository. Basically it's a buildpack that installs buildpacks which provides alternative path to standard Heroku buildpack API (heroku buildpack) which only works against public repositories.

It hooks in only to the release and compile api.

Usage

  1. Add the buildpack:
heroku buildpacks:add https://github.com/katana-scm/heroku-private-buildpack.git \
  --index 1 -a my-application

IMPORTANT: we do NOT add the buildpack for the heroku app with Heroku CLI (heroku buildpack:add) as that would not work out for us as we can then have control over how git clone within the buildpack inclusion logic will be used. We only add this repository as buildpack and continue listing the private buildpacks as shown below (next step). In case you have added the buildpack that is hosted in a private repository to heroku via official buildpacks support (the CLI command above), please remove them with heroku buildpack:remove.

  1. Add a file in the project root .heroku-private-build.lst that would contain plain list of private build pack repository URLs:
git@github.com:my-company/my-secrent-buildpack-a.git
git@github.com:my-company/my-secrent-buildpack-b.git
  1. Register SSH key in GitHub that would have access to the private repositories. Guide for doin so can be found HERE.

  2. Add the base64 enocded deploy key to the BUILDPACK_SSH_KEY env variable for specific service that uses heroku-private-buildpack (If you already have id_rsa, do no overwrite it and choose a different name instead. Example: heroku_buildpacks):

    heroku config:set BUILDPACK_SSH_KEY=$(cat path/to/your/keys/id_rsa | base64)

Buildpack Metadata

Note that this solution has currently a downside of not performing proper metadata consolidation from the private buildpacks and returns empty metadata response instead.

There is thought a possibility of composing their own merged meta-data via .heroku-private-metadata.yml which would be sent (when present) as output of bin/release.

About

Allows using Heroku buildpacks from private repositories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages