Skip to content

Commit

Permalink
Improve script a little bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
brendandburns committed Feb 4, 2019
1 parent 52b65f8 commit d8f9ed9
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions examples/createPod.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
#creates a pod and runs Example.java(list pods for all namespaces) on starting of pod
export REPO_ROOT=$(pwd)/../
#!/bin/bash

cd ${REPO_ROOT}/kubernetes
# creates a pod and runs
# Example.java(list pods for all namespaces) on starting of pod

# Exit on any error.
set -e

if ! which minikube > /dev/null; then
echo "This script requires minikube installed."
exit 100
fi

dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export REPO_ROOT=${dir}/..

cd ${REPO_ROOT}
mvn install

cd ${REPO_ROOT}/examples
mvn package

eval $(minikube docker-env)
docker build -t test/examples:1.0 .
kubectl apply -f test.yaml

0 comments on commit d8f9ed9

Please sign in to comment.