You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ra...@apache.org on 2018/09/24 16:57:28 UTC

[incubator-openwhisk] branch master updated: Support base64 encoded config (#4039)

This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new a6ae673  Support base64 encoded config (#4039)
a6ae673 is described below

commit a6ae673bb55bdcdb5750d63066fd2903174e5fde
Author: Chetan Mehrotra <ch...@apache.org>
AuthorDate: Mon Sep 24 22:27:20 2018 +0530

    Support base64 encoded config (#4039)
---
 common/scala/transformEnvironment.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/common/scala/transformEnvironment.sh b/common/scala/transformEnvironment.sh
index 657df56..6efc127 100755
--- a/common/scala/transformEnvironment.sh
+++ b/common/scala/transformEnvironment.sh
@@ -34,10 +34,16 @@ configVariables=$(compgen -v | grep $prefix)
 
 props=()
 
-if [ -n "$OPENWHISK_CONFIG" ]
+if [ -n "$OPENWHISK_CONFIG" ]; then
+    config="$OPENWHISK_CONFIG"
+elif [ -n "$OPENWHISK_ENCODED_CONFIG" ]; then
+    config=$(echo "$OPENWHISK_ENCODED_CONFIG" | base64 -d)
+fi
+
+if [ -n "$config" ]
 then
     location="/config.conf"
-    printf "%s" "$OPENWHISK_CONFIG" > "$location"
+    printf "%s" "$config" > "$location"
     props+=("-Dconfig.file='$location'")
 fi