Skip to content

Instantly share code, notes, and snippets.

View pritidesai's full-sized avatar
🥂

Priti Desai pritidesai

🥂
View GitHub Profile
packages:
SlackPackage:
dependencies:
slack-package-to-post-messages:
location: /whisk.system/slack
inputs:
username: $SLACK_USERNAME
url: $SLACK_URL
channel: $SLACK_CHANNEL
actions:
application:
name: AppToPostToSlack
packages:
SlackPackage:
actions:
post-to-slack:
inputs:
message: "Hello from WskDeploy!"
slack_package: slack-package-to-post-messages
triggers:
packages:
SlackPackage:
dependencies:
slack-package-to-post-messages:
location: /whisk.system/slack
inputs:
username: $SLACK_USERNAME
url: $SLACK_URL
channel: $SLACK_CHANNEL
packages:
zipaction:
actions:
my-zip-action:
function: actions/my-zip-action
runtime: nodejs:6
inputs:
name: Amy
function helloworld(params) {
var format = require('string-format');
var name = params.name || 'Stranger';
payload = format('Hello, {}!', name)
return { message: payload };
}
exports.main = helloworld;
{
"name": "my-zip-action",
"description": "Node OpenWhisk zip action to demo Whisk Deploy",
"license": "Apache-2.0",
"version": "1.0.0",
"main": "index.js",
"dependencies": {
"string-format": "0.5.0"
}
}
packages:
RootProject:
dependencies:
helloworlds:
location: github.com/apache/incubator-openwhisk-test/packages/helloworlds
triggers:
trigger1:
trigger2:
rules:
rule1:
packages:
RootProject:
dependencies:
ChildProject:
location: github.com/apache/incubator-openwhisk-test/packages/helloworlds
triggers:
trigger1:
trigger2:
rules:
rule1:
packages:
RootProject:
dependencies:
ChildProject1:
location: github.com/apache/incubator-openwhisk-test/packages/helloworlds
ChildProject2:
location: github.com/apache/incubator-openwhisk-test/packages/hellowhisk
sequences:
ChildProject1-series:
actions: ChildProject1/hello-js, ChildProject1/helloworld-js
function helloworld(params) {
var format = require('string-format');
var name = params.name || 'Stranger';
payload = format('Hello, {}!', name)
return { message: payload };
}
exports.main = helloworld;