Skip to content

Instantly share code, notes, and snippets.

@ericstoekl
Created July 10, 2018 04:47
Show Gist options
  • Save ericstoekl/9bb4fa2f9f66a9ba068f519615a5ef6c to your computer and use it in GitHub Desktop.
Save ericstoekl/9bb4fa2f9f66a9ba068f519615a5ef6c to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "Thanks for testing openfaas/faas PR 304 -- Prefer user supplied parameter for remove and deploy"
echo "Make sure that openfaas is deployed to localhost Docker Swarm before running this test"
# Build faas-cli
echo "Building the code in the openfaas repo"
./build.sh
echo "Installing faas-cli 0.6.13 (will prompt for password)"
curl -sSL cli.openfaas.com | sudo sh
mkdir argTest
cd argTest
echo "In dir argTest/"
echo "Creating function p1"
faas new --lang python p1
cp p1.yml stack.yml
echo "Creating function p2, appending it to stack.yml"
faas new --lang python p2 --append stack.yml
cmd="deploy --image alpine --fprocess cat --name catsvc"
echo "----------------"
echo "Running faas-cli 0.6.13 with $cmd"
echo "----------------"
faas $cmd
echo "----------------"
echo "Running faas-cli for PR 304 with $cmd"
echo "----------------"
../faas-cli $cmd
cmd="remove p1"
echo "----------------"
echo "Running faas-cli 0.6.13 with $cmd"
echo "----------------"
faas $cmd
echo "----------------"
echo "Running faas-cli for PR 304 with $cmd"
echo "----------------"
../faas-cli $cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment