commit | bd9ffba070cfd771acb220cc437c0ee9882121ad | [log] [tgz] |
---|---|---|
author | Matt Rutkowski <mrutkows@us.ibm.com> | Thu Aug 17 09:41:05 2017 -0500 |
committer | GitHub <noreply@github.com> | Thu Aug 17 09:41:05 2017 -0500 |
tree | eb0e52d537a326d35e741a1de885be25d9ab56aa | |
parent | bfb880299a368d9df101b26ec514828dc6f93854 [diff] |
Update to ASF license; adjust README. (#12) @csantanapr there looks to be a problem actually installing the package template using wsk command; having nothing to do with scancode updates from this PR. I need to merge this and we should address the install error on another issue.
This package is a template for Openwhisk Packages, it can be used to build, test and integrate new packages.
openwhisk-package-template/ ├── actions │ └── hello_world.js ├── CONTRIBUTING.md ├── feeds │ └── ... ├── install.sh ├── LICENSE.txt ├── README.md ├── tests │ ├── credentials.json │ ├── credentials.json.enc │ └── src │ └── TemplateTests.scala ├── tools │ └── travis │ └── build.sh ├── TriggerProvider │ └── ... └── uninstall.sh
Install the package using ./install.sh $EDGE_HOST $AUTH_KEY $WSK_CLI
where :
This will create a new package called packageTemplate as well as a hello world action.
To uninstall the package, please use ./uninstall.sh $EDGE_HOST $AUTH_KEY $WSK_CLI
##Testing You can test your package using the test cases you provided within tests/src, it is highly recommended to use Scala in writing test cases. To execute the test cases locally ( local deployment of Openwhisk), please copy your test files into openwhisk/tests/src/packages
and then by using gradle within Openwhisk gradle :tests:test
this will execute all test files of openwhisk, to execute a specific test class you can use gradle :tests:test --tests "packages.CLASS_NAME
credentials: You may need credentials during testing, you can put whatever credentials you need in tests/credentials.json
(use tests/template_ceredentials.json
as an example). In case of travis deployment for continuous integration, you can encrypt credentials.json file by using travis CLI.
Caution: Do not forget to include tests/credentials.json in .gitignore.
##Package contents | Entity | Type | Parameters | Description | | --- | --- | --- | --- | | /namespace/packageTemplate
| package | - | Openwhisk Package Template | | /namespace/packageTemplate/helloWorld
| action | details | A simple hello world action |
###Feeds List here Feed actions ...
###Actions ####Hello World This action is a simple hello world, ######Parameters | Parameter | Type | Required | Description| Options | Default | Example | | ------------- | ---- | -------- | ------------ | ------- | ------- |------- | | name | string | no | A name to greet | - | - | “Openwhisk” |
######Usage To use this action, you need to pass the required parameters (refer to the table above)
wsk action invoke /namespace/packageTemplate/helloWorld -p name 'Openwhisk' --blocking
Output:
{ "message": "Hello, Openwhisk!" }
Please refer to CONTRIBUTING.md
See LICENSE.txt