Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 682 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 682 Bytes

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