Skip to content

Commit d8f9ed9

Browse files
committed
Improve script a little bit.
1 parent 52b65f8 commit d8f9ed9

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

examples/createPod.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1-
#creates a pod and runs Example.java(list pods for all namespaces) on starting of pod
2-
export REPO_ROOT=$(pwd)/../
1+
#!/bin/bash
32

4-
cd ${REPO_ROOT}/kubernetes
3+
# creates a pod and runs
4+
# Example.java(list pods for all namespaces) on starting of pod
5+
6+
# Exit on any error.
7+
set -e
8+
9+
if ! which minikube > /dev/null; then
10+
echo "This script requires minikube installed."
11+
exit 100
12+
fi
13+
14+
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
15+
16+
export REPO_ROOT=${dir}/..
17+
18+
cd ${REPO_ROOT}
519
mvn install
620

721
cd ${REPO_ROOT}/examples
822
mvn package
23+
924
eval $(minikube docker-env)
1025
docker build -t test/examples:1.0 .
1126
kubectl apply -f test.yaml

0 commit comments

Comments
 (0)