mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
demoReorgToEaseTesting
This commit is contained in:
@@ -3,17 +3,17 @@
|
||||
These demos assume that `kustomize` is on your `$PATH`.
|
||||
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
|
||||
World server.
|
||||
|
||||
* [LDAP](ldap.md) - Deploy multiple
|
||||
* [LDAP](ldap/README.md) - Deploy multiple
|
||||
(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.
|
||||
|
||||
* [springboot](springboot.md) - Create a Spring Boot
|
||||
* [springboot](springboot/README.md) - Create a Spring Boot
|
||||
application production configuration from scratch.
|
||||
|
||||
* [configGeneration](configGeneration.md) -
|
||||
|
||||
@@ -50,7 +50,7 @@ mkdir -p $BASE
|
||||
|
||||
curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\
|
||||
/kubernetes-sigs/kustomize\
|
||||
/master/demos/data/helloWorld\
|
||||
/master/demos/helloWorld\
|
||||
/{configMap,deployment,kustomization,service}.yaml"
|
||||
```
|
||||
|
||||
57
demos/integration_tests.sh
Executable file
57
demos/integration_tests.sh
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2018 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# 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 {
|
||||
local msg=$1
|
||||
echo >&2 ${msg}
|
||||
exit 1
|
||||
}
|
||||
|
||||
base_dir="$( cd "$(dirname "$0")/../../.." && pwd )"
|
||||
cd "$base_dir" || {
|
||||
exit_with "Cannot cd to ${base_dir}. Aborting."
|
||||
}
|
||||
|
||||
go install github.com/kubernetes-sigs/kustomize || \
|
||||
{ exit_with "Failed to install kustomize"; }
|
||||
export PATH=$GOPATH/bin:$PATH
|
||||
|
||||
home=`pwd`
|
||||
|
||||
### LDAP TEST ###
|
||||
demo_dir="./demos/ldap"
|
||||
if [ ! -d ${demo_dir} ]; then
|
||||
exit_with "directory ${demo_dir} doesn't exist"
|
||||
fi
|
||||
|
||||
test_script="${demo_dir}/integration_test.sh"
|
||||
|
||||
if [ -x "${test_script}" ]; then
|
||||
${test_script} ${demo_dir}/base
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "testing ${demo_dir} passed."
|
||||
else
|
||||
exit_with "testing ${demo_dir} failed."
|
||||
fi
|
||||
else
|
||||
exit_with "Unable to run ${test_script}"
|
||||
fi
|
||||
#################
|
||||
@@ -45,7 +45,7 @@ mkdir -p $BASE
|
||||
|
||||
CONTENT="https://raw.githubusercontent.com\
|
||||
/kubernetes-sigs/kustomize\
|
||||
/master/demos/data/ldap"
|
||||
/master/demos/ldap"
|
||||
|
||||
curl -s -o "$BASE/#1" "$CONTENT/base\
|
||||
/{deployment.yaml,kustomization.yaml,service.yaml,env.startup.txt}"
|
||||
@@ -29,7 +29,7 @@ Download them:
|
||||
```
|
||||
curl -s -o "$DEMO_HOME/#1.yaml" "https://raw.githubusercontent.com\
|
||||
/kubernetes-sigs/kustomize\
|
||||
/master/demos/data/mySql\
|
||||
/master/demos/mySql\
|
||||
/{deployment,secret,service}.yaml"
|
||||
```
|
||||
|
||||
@@ -31,7 +31,7 @@ Download them:
|
||||
```
|
||||
CONTENT="https://raw.githubusercontent.com\
|
||||
/kubernetes-sigs/kustomize\
|
||||
/master/demos/data/springboot"
|
||||
/master/demos/springboot"
|
||||
|
||||
curl -s -o "$DEMO_HOME/#1.yaml" \
|
||||
"$CONTENT/base/{deployment,service}.yaml"
|
||||
Reference in New Issue
Block a user