Install the package using ./install.sh $EDGE_HOST $AUTH_KEY $WSK_CLI
where :
$EDGE_HOST is where openwhisk is deployed
$AUTH_KEY is the authentication key
$WSK_CLI is the path of Openwhisk command interface binary
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.
Openwhisk Package Template
This package is a template for Openwhisk Packages, it can be used to build, test and integrate new packages.
How to install and uninstall this package?
Install the package using
./install.sh $EDGE_HOST $AUTH_KEY $WSK_CLIwhere :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_CLITesting
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/packagesand then by using gradle within Openwhiskgradle :tests:testthis will execute all test files of openwhisk, to execute a specific test class you can usegradle :tests:test --tests "packages.CLASS_NAMEcredentials: You may need credentials during testing, you can put whatever credentials you need in
tests/credentials.json(usetests/template_ceredentials.jsonas 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
/namespace/packageTemplate/namespace/packageTemplate/helloWorldFeeds
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)
Output:
Contributing
Please refer to CONTRIBUTING.md
License
See LICENSE.txt