demoReorgToEaseTesting

This commit is contained in:
Jeffrey Regan
2018-05-15 15:43:02 -07:00
parent 831bd5df75
commit 9bc92f133f
33 changed files with 31 additions and 20 deletions

View File

@@ -3,17 +3,17 @@
These demos assume that `kustomize` is on your `$PATH`. These demos assume that `kustomize` is on your `$PATH`.
They are covered by pre-submit tests. They are covered by pre-submit tests.
* [hello world](helloWorld.md) - Deploy multiple * [hello world](helloWorld/README.md) - Deploy multiple
(differently configured) variants of a simple Hello (differently configured) variants of a simple Hello
World server. World server.
* [LDAP](ldap.md) - Deploy multiple * [LDAP](ldap/README.md) - Deploy multiple
(differently configured) variants of a LDAP server. (differently configured) variants of a LDAP server.
* [mySql](mySql.md) - Create a MySQL production * [mySql](mySql/README.md) - Create a MySQL production
configuration from scratch. configuration from scratch.
* [springboot](springboot.md) - Create a Spring Boot * [springboot](springboot/README.md) - Create a Spring Boot
application production configuration from scratch. application production configuration from scratch.
* [configGeneration](configGeneration.md) - * [configGeneration](configGeneration.md) -

View File

@@ -50,7 +50,7 @@ mkdir -p $BASE
curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\ curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\
/kubernetes-sigs/kustomize\ /kubernetes-sigs/kustomize\
/master/demos/data/helloWorld\ /master/demos/helloWorld\
/{configMap,deployment,kustomization,service}.yaml" /{configMap,deployment,kustomization,service}.yaml"
``` ```

View File

@@ -14,6 +14,11 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# This script run periodically by kubernetes test-infra.
# At time of writing, it's 'call point' was in
# https://github.com/kubernetes/test-infra/blob/master/jobs/config.json
function exit_with { function exit_with {
local msg=$1 local msg=$1
echo >&2 ${msg} echo >&2 ${msg}
@@ -22,25 +27,31 @@ function exit_with {
base_dir="$( cd "$(dirname "$0")/../../.." && pwd )" base_dir="$( cd "$(dirname "$0")/../../.." && pwd )"
cd "$base_dir" || { cd "$base_dir" || {
echo "Cannot cd to '$base_dir'. Aborting." >&2 exit_with "Cannot cd to ${base_dir}. Aborting."
exit 1
} }
# Install kustomize to $GOPATH/bin and export PATH go install github.com/kubernetes-sigs/kustomize || \
go install ./cmd/kustomize || { exit_with "Failed to install kustomize"; } { exit_with "Failed to install kustomize"; }
export PATH=$GOPATH/bin:$PATH export PATH=$GOPATH/bin:$PATH
home=`pwd` home=`pwd`
example_dir="./cmd/kustomize/demos/data/ldap/base"
if [ ! -d ${example_dir} ]; then ### LDAP TEST ###
exit_with "directory ${example_dir} doesn't exist" demo_dir="./demos/ldap"
if [ ! -d ${demo_dir} ]; then
exit_with "directory ${demo_dir} doesn't exist"
fi fi
if [ -x "${example_dir}/tests/test.sh" ]; then test_script="${demo_dir}/integration_test.sh"
${example_dir}/tests/test.sh ${example_dir}
if [ -x "${test_script}" ]; then
${test_script} ${demo_dir}/base
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
echo "testing ${example_dir} passed." echo "testing ${demo_dir} passed."
else else
exit_with "testing ${example_dir} failed." exit_with "testing ${demo_dir} failed."
fi fi
fi else
exit_with "Unable to run ${test_script}"
fi
#################

View File

@@ -45,7 +45,7 @@ mkdir -p $BASE
CONTENT="https://raw.githubusercontent.com\ CONTENT="https://raw.githubusercontent.com\
/kubernetes-sigs/kustomize\ /kubernetes-sigs/kustomize\
/master/demos/data/ldap" /master/demos/ldap"
curl -s -o "$BASE/#1" "$CONTENT/base\ curl -s -o "$BASE/#1" "$CONTENT/base\
/{deployment.yaml,kustomization.yaml,service.yaml,env.startup.txt}" /{deployment.yaml,kustomization.yaml,service.yaml,env.startup.txt}"

View File

@@ -29,7 +29,7 @@ Download them:
``` ```
curl -s -o "$DEMO_HOME/#1.yaml" "https://raw.githubusercontent.com\ curl -s -o "$DEMO_HOME/#1.yaml" "https://raw.githubusercontent.com\
/kubernetes-sigs/kustomize\ /kubernetes-sigs/kustomize\
/master/demos/data/mySql\ /master/demos/mySql\
/{deployment,secret,service}.yaml" /{deployment,secret,service}.yaml"
``` ```

View File

@@ -31,7 +31,7 @@ Download them:
``` ```
CONTENT="https://raw.githubusercontent.com\ CONTENT="https://raw.githubusercontent.com\
/kubernetes-sigs/kustomize\ /kubernetes-sigs/kustomize\
/master/demos/data/springboot" /master/demos/springboot"
curl -s -o "$DEMO_HOME/#1.yaml" \ curl -s -o "$DEMO_HOME/#1.yaml" \
"$CONTENT/base/{deployment,service}.yaml" "$CONTENT/base/{deployment,service}.yaml"