apache / apache/openwhisk-wskdeploy

Create Action from a ZIP file

Open
#250 12 comments 0 reactions 1 assignee Claimed by @pritidesai View on GitHub
priority: medium
Dominant language
Go
Stars
75
Forks
73
PR merge metrics
No merged PRs in 30d

Description

We have a use case of creating an action from a zip file after running set of bash commands, e.x: when an action directory contains index.js and package.json for node runtime:

```
ls actions/my-action/
index.js
package.json
cd actions/my-action
npm install
zip -rq action.zip *
wsk action create my-action --kind nodejs:6 action.zip
```

[Here](https://github.com/IBM/openwhisk-serverless-apis) is the OpenWhisk Serverless repo.

Here the question is, how do we support this kind of workflow without expecting users to run those bash commands before initiating wskdeploy? We can define a new notation for such use case. Right now action has roughly following grammar:

```
actions:
hello:
version: 1.0
function: src/hello/hello.js
runtime: nodejs
inputs:
personName: Bob
outputs:
greeting_string: string
```

Either we overload existing grammar say, "If action source has a filename ending in .zip and runtime nodejs, wskdeploy packages dependencies (npn install) and creates a zip file before creating an action." Or Introduce new key to support "kind" flag.

Whatever approach we decide, we have to make this generic and include all possible runtimes.

I have had chat with @mrutkows yesterday regarding this and we decided to open a new issue for it. @paulcastro @daisy-ycguo thoughts?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.