You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by mr...@apache.org on 2018/05/04 16:53:41 UTC
[incubator-openwhisk-wskdeploy] branch master updated: adding list
of YAML key/values which supports env. variables (#894)
This is an automated email from the ASF dual-hosted git repository.
mrutkowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-wskdeploy.git
The following commit(s) were added to refs/heads/master by this push:
new 71a99c9 adding list of YAML key/values which supports env. variables (#894)
71a99c9 is described below
commit 71a99c90936d6e1e9d3a9e6767d461ca10f2455a
Author: Priti Desai <pd...@us.ibm.com>
AuthorDate: Fri May 4 09:53:38 2018 -0700
adding list of YAML key/values which supports env. variables (#894)
---
docs/wskdeploy_interpolation.md | 130 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 130 insertions(+)
diff --git a/docs/wskdeploy_interpolation.md b/docs/wskdeploy_interpolation.md
new file mode 100644
index 0000000..1ca9b3f
--- /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
+```
+
+
+
+
--
To stop receiving notification emails like this one, please contact
mrutkowski@apache.org.