Skip to content

Buildpack for using ssh private keys inside buildpack v3 compliant buildpacks

License

Notifications You must be signed in to change notification settings

quorauk/ssh-private-key-buildpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SSH Private key buildpack for Buildpacks v3

builds upon work done here

Used as part of a chain of buildpacks, allows the use of ssh keys inside a builder

Usage

inside another buildpack

#!/usr/bin/env bash
set -eo pipefail

layersdir=$1
env_dir=$2/env

export SSH_DIRECTORY="$(cat $env_dir/SSH_DIRECTORY)"

echo "---> Java Buildpack" 
if [[ $SSH_DIRECTORY ]] ; then
  setup-ssh
fi

# git clone [email protected]:username/private-repo.git
...

then build your app using

pack build --env="SSH_PRIVATE_KEY=$(cat ~/.ssh/id_rsa)" --path=/path/to/app --buildpacks=path/to/private-ssh-pack,path/to/language-pack

About

Buildpack for using ssh private keys inside buildpack v3 compliant buildpacks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages