You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dr...@apache.org on 2018/09/28 16:21:34 UTC
[incubator-openwhisk-devtools] branch master updated: Cleanup the
API for the hello world action (#162)
This is an automated email from the ASF dual-hosted git repository.
dragos pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git
The following commit(s) were added to refs/heads/master by this push:
new ed5415f Cleanup the API for the hello world action (#162)
ed5415f is described below
commit ed5415f94565c351ae3024fef3c95c9d488967d4
Author: Alvaro Lopez Garcia <al...@ifca.unican.es>
AuthorDate: Fri Sep 28 18:21:26 2018 +0200
Cleanup the API for the hello world action (#162)
The make hello-world command created a hello world action and associated
it with the action that was created before. However, this API was not
deleted afterwards.
---
docker-compose/Makefile | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index 7f15bdd..7a3b23e 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -334,13 +334,16 @@ hello-world: create-hello-world-function
&& echo "invocation result:" $$res \
&& (echo $$res | grep "Hello, World") || ($(WSK_CLI) -i action delete hello && tail -n 200 ~/tmp/openwhisk/invoker/logs/invoker-local_logs.log ~/tmp/openwhisk/controller/logs/controller-local_logs.log && exit 1)
- echo "$$(tput setaf 4) creating an API from the hello function ...$$(tput sgr0)"
+ echo "$$(tput setaf 4)creating an API from the hello function ...$$(tput sgr0)"
$(WSK_CLI) -i action update "/guest/hello" --web true
web_action=`$(WSK_CLI) -i api create /hello /world get hello --response-type json | tail -n 1` \
&& echo "invoking: " $$web_action \
- && (echo $$web_action | xargs curl -sS | grep "Hello, World") || ($(WSK_CLI) -i action delete hello && echo "Error invoking the web action" && tail -n 200 ~/tmp/openwhisk/invoker/logs/invoker-local_logs.log ~/tmp/openwhisk/controller/logs/controller-local_logs.log && exit 1)
+ && (echo $$web_action | xargs curl -sS | grep "Hello, World") || (echo "Error invoking the web action" && tail -n 200 ~/tmp/openwhisk/invoker/logs/invoker-local_logs.log ~/tmp/openwhisk/controller/logs/controller-local_logs.log && exit 1)
$(WSK_CLI) -i api list /hello
+ echo "$$(tput setaf 1)deleting the API ...$$(tput sgr0)"
+ $(WSK_CLI) -i api delete /hello
+
echo "$$(tput setaf 1)deleting the function ...$$(tput sgr0)"
$(WSK_CLI) -i action delete hello
rm hello.js