#!/bin/bash
actionname=$1
number=$2

cd /home/ubuntu/DAGit/function_modules/testaction
python3 ../../controlplane/registrations/function_register.py test.py Dockerfile requirements.txt $actionname$number
cd /home/ubuntu/DAGit/function_modules/$actionname
sudo /home/ubuntu/DAGit/controlplane/buildAndPush.sh $actionname-image 10.0.0.62:5000
wsk -i action  update $actionname$number --docker 10.0.0.62:5000/$actionname-image
#wsk -i action invoke noop --result