Make Windows multi-cluster

Make Windows a multi-cluster example. Allow test to use fleet binaries
from any path.
This commit is contained in:
Nick Gerace
2021-02-18 16:04:21 -05:00
parent 2ec09778b8
commit 3162ee1212
10 changed files with 99 additions and 53 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
export COMMIT=fake
@@ -7,6 +7,17 @@ cd $(dirname $0)
rm -rf output
FLEET_PATH=fleet
if ! [ $(command -v fleet) ]; then
printf "Not found in PATH: fleet\n"
read -p "Specify path to fleet binary (leave blank to exit): " TEMP_FLEET_PATH
if ! [ $TEMP_FLEET_PATH ]; then
exit 0
fi
FLEET_PATH=$(realpath $TEMP_FLEET_PATH)
printf "Path to fleet binary: $FLEET_PATH\n"
fi
for i in ../single-cluster/*; do
if [ ! -d $i ]; then
continue
@@ -14,8 +25,8 @@ for i in ../single-cluster/*; do
pushd $i
for j in dev test prod; do
mkdir -p ../../tests/output/garbage/${i}
fleet test > ../../tests/output/garbage/${i}/${j}-output.yaml
fleet apply -o - test > ../../tests/output/garbage/${i}/bundle.yaml
eval $FLEET_PATH test > ../../tests/output/garbage/${i}/${j}-output.yaml
eval $FLEET_PATH apply -o - test > ../../tests/output/garbage/${i}/bundle.yaml
done
popd
done
@@ -27,8 +38,8 @@ for i in ../multi-cluster/*; do
pushd $i
for j in dev test prod; do
mkdir -p ../../tests/output/garbage/${i}
fleet test -l env=${j} > ../../tests/output/garbage/${i}/${j}-output.yaml
fleet apply -n fleet-default -o - test > ../../tests/output/garbage/${i}/bundle.yaml
eval $FLEET_PATH test -l env=${j} > ../../tests/output/garbage/${i}/${j}-output.yaml
eval $FLEET_PATH apply -n fleet-default -o - test > ../../tests/output/garbage/${i}/bundle.yaml
done
popd
done