File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
builders/container-apps-internal-registry-demo Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ RUN chmod u+x /startup-script.sh
49
49
RUN touch /usr/local/share/ca-certificates/internalregistry.crt \
50
50
&& chmod 666 /usr/local/share/ca-certificates/internalregistry.crt
51
51
RUN chown ${CNB_USER_ID}:${CNB_GROUP_ID} /etc/ssl/certs/ \
52
- && chown ${CNB_USER_ID}:${CNB_GROUP_ID} /usr/local/share/ca-certificates/
52
+ && chown ${CNB_USER_ID}:${CNB_GROUP_ID} /usr/local/share/ca-certificates/ \
53
+ && chown ${CNB_USER_ID}:${CNB_GROUP_ID} /platform/env
54
+
53
55
54
56
# Give cnb user permission to /cnb/extensions directory
55
57
RUN mkdir -p ${CNB_EXTENSIONS_DIR} && \
Original file line number Diff line number Diff line change @@ -13,6 +13,21 @@ temp_app_source_dir="/tmp/appsource"
13
13
temp_app_source_path=" $temp_app_source_dir /$FILE_UPLOAD_BLOB_NAME "
14
14
mkdir $temp_app_source_dir
15
15
16
+ # List all the environment variables and filter the environment variable with prefix "ACA_CLOUD_BUILD_USER_ENV_", then write them to folder "/platform/env",
17
+ # file name is the environment variable name without prefix, file content is the environment variable value.
18
+ build_env_dir=" /platform/env"
19
+ env | grep -E ' ^ACA_CLOUD_BUILD_USER_ENV_' | while read -r line; do
20
+ key=$( echo " $line " | cut -d= -f1)
21
+ value=$( echo " $line " | cut -d= -f2-)
22
+ filename=" ${key# ACA_CLOUD_BUILD_USER_ENV_} "
23
+ echo " $value " > " $build_env_dir /$filename "
24
+ done
25
+
26
+ # write environment variable CORRELATION_ID to folder "/platform/env",
27
+ if [ -n " $CORRELATION_ID " ]; then
28
+ echo " $CORRELATION_ID " > " $build_env_dir /CORRELATION_ID"
29
+ fi
30
+
16
31
while [[ ! -f " $temp_app_source_path " || ! " $( file $temp_app_source_path ) " =~ " compressed data" ]]
17
32
do
18
33
echo " Waiting for app source to be uploaded. Please upload the app source to the endpoint specified in the Build resource's 'uploadEndpoint' property."
You can’t perform that action at this time.
0 commit comments