Skip to content

Commit ebeb922

Browse files
committed
fix(env_dir): Remove directories from the env dir passed to the compile
1 parent 2e03d3f commit ebeb922

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

rootfs/builder/build.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ app_dir=/app
1414
build_root=/tmp/build
1515
cache_root=/tmp/cache
1616
cache_file=/tmp/cache.tgz
17-
env_root=/tmp/env
17+
secret_dir=/tmp/env
18+
env_root=/tmp/environment
1819
buildpack_root=/tmp/buildpacks
1920

2021
mkdir -p $app_dir
2122
mkdir -p $cache_root
2223
mkdir -p $env_root
24+
mkdir -p $secret_dir
2325
mkdir -p $buildpack_root
2426
mkdir -p $build_root/.profile.d
2527

@@ -97,6 +99,12 @@ REQUEST_ID=$(openssl rand -base64 32)
9799
export REQUEST_ID
98100
export STACK=cedar-14
99101

102+
## copy the environment dir excluding the ephemeral ..data/ dir and other symlinks created by Kubernetes.
103+
104+
if [ "$(ls -A $secret_dir)" ]; then
105+
cp $secret_dir/* $env_root/
106+
fi
107+
100108
## SSH key configuration
101109

102110
if [[ -n "$SSH_KEY" ]]; then

0 commit comments

Comments
 (0)