You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/05/04 16:53:40 UTC

[GitHub] mrutkows closed pull request #894: adding list of YAML key/values which supports env. variables

mrutkows closed pull request #894: adding list of YAML key/values which supports env. variables
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/894
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/wskdeploy_interpolation.md b/docs/wskdeploy_interpolation.md
new file mode 100644
index 00000000..1ca9b3f1
--- /dev/null
+++ b/docs/wskdeploy_interpolation.md
@@ -0,0 +1,130 @@
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more contributor
+# license agreements.  See the NOTICE file distributed with this work for additional
+# information regarding copyright ownership.  The ASF licenses this file to you
+# under the Apache License, Version 2.0 (the # "License"); you may not use this
+# file except in compliance with the License.  You may obtain a copy of the License
+# at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed
+# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+# CONDITIONS OF ANY KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations under the License.
+#
+-->
+
+# Whisk Deploy Interpolation
+
+Here is the list of YAML key/value in manifest/deployment file for which Whisk Deploy
+supports interpolation including evaluating strings using environment variables.
+For example, `$USERNAME` and `${USERNAME}` evaluates to environment variable `USERNAME`.
+It also supports double `$` notation, for example, `$${USERNAME}` evaluates to `${USERNAME}`.
+## Manifest File
+
+#### Package Name
+
+```yaml
+project:
+    name: helloworld
+    packages:
+        $PACKAGE_NAME_1:
+            actions:
+                ...
+        ${PACKAGE_NAME_2}:
+            actions:
+                ...
+        ${PACKAGE_NAME_3}_package:
+            actions:
+                ...
+```
+
+#### Annotation (under Action, Sequence, Trigger, Rule, and Dependency)
+
+```yaml
+project:
+    name: helloworld
+    packages:
+        helloworld:
+            actions:
+                hello:
+                    function: hello.js
+                    annotation:
+                        username: $USERNAME
+                        password: ${PASSWORD}
+                        host: http://${USERNAME}@${PASSWORD}/${URL}.com
+```
+
+#### Action Function
+
+```yaml
+project:
+    name: helloworld
+    packages:
+        helloworld:
+            actions:
+                hello1:
+                    function: $OPENWHISK_FUNCTION_FILE
+                    runtime: nodejs:6
+                hello2:
+                    function: ${OPENWHISK_FUNCTION_FILE}
+                    runtime: nodejs:6
+                hello3:
+                    function: ${OPENWHISK_FUNCTION_PYTHON}.py
+                hello4:
+                    function: https://${OPENWHISK_FUNCTION_GITHUB_DIR}.js                    function: github.com/apache/incubator-openwhisk-test/packages/helloworlds
+```
+
+#### Trigger Feed
+
+```yaml
+project:
+    name: helloworld
+    packages:
+        helloworld:
+            triggers:
+                everyhour:
+                    feed: /whisk.system/alarms/alarm
+                message-trigger:
+                    feed: Cloud_Functions_${KAFKA_INSTANCE}_Credentials-1/messageHubFeed
+                github-trigger:
+                    feed: ${GITHUB_PACKAGE}/webhook
+```
+
+#### Inputs (under Package, Action, Dependency, Trigger, and Trigger Feed)
+
+```yaml
+project:
+    name: helloworld
+    packages:
+        helloworld:
+            actions:
+                hello:
+                    inputs:
+                        username: $USERNAME
+                        password: ${PASSWORD}
+                        host: https://${USERNAME}@${PASSWORD}/github.com
+```
+
+## Deployment File
+
+#### Inputs (under Package, Action, and Trigger)
+
+```yaml
+project:
+    name: helloworld
+    packages:
+        helloworld:
+            actions:
+                hello:
+                    inputs:
+                        username: $USERNAME
+                        password: ${PASSWORD}
+                        host: https://${USERNAME}@${PASSWORD}/github.com
+```
+
+
+
+


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services