Public Information
This commit is contained in:
36
samples/cluster/build.sh
Executable file
36
samples/cluster/build.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This sample script builds the example as described. It is also used to build the test environment in our lab,
|
||||
# so it should be well tested.
|
||||
#
|
||||
|
||||
# Make sure it fails immediately, if anything goes wrong
|
||||
set -e
|
||||
|
||||
# -- ENVironment variables:
|
||||
# CHARTS: The path to the source code
|
||||
# DEST: The path to the build destination
|
||||
# SAMPLE: The name of the sample
|
||||
SAMPLE=cluster
|
||||
|
||||
# Check, if we have the source code available
|
||||
if [ ! -d "$CHARTS" ]; then
|
||||
echo "ERROR Building $SAMPLE example: The Charts Sources folder is not set. Please make sure to run this script with the full Source Code available"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$DEST" ]; then
|
||||
echo "ERROR Building $SAMPLE example: DEST folder not found."
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -d "$CHARTS/$SAMPLE" ]; then
|
||||
echo "ERROR Building $SAMPLE example: Chart Sources in $CHARTS/$SAMPLE not found. Are you running this script as a subscriber?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Output what is happening
|
||||
echo "Building $SAMPLE"
|
||||
|
||||
# Create the manifest
|
||||
mkdir -p $DEST/cluster
|
||||
helm template --debug \
|
||||
nplus $CHARTS/cluster > $DEST/cluster/nplus.yaml
|
||||
Reference in New Issue
Block a user