Skip to content

Commit fabc060

Browse files
authored
Merge pull request #594 from mbaldessari/fix
Move the common slim + multisource test into Makefile
2 parents 66e791e + 2414796 commit fabc060

2 files changed

Lines changed: 8 additions & 17 deletions

File tree

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,14 @@ validate-prereq: ## verify pre-requisites
169169
if ! ansible-galaxy collection list | grep kubernetes.core > /dev/null 2>&1; then echo "Not found"; exit 1; fi;\
170170
echo "OK";\
171171
else\
172-
echo "Skipping prerequisites check as we're running inside a container";\
172+
if [ -f values-global.yaml ]; then\
173+
OUT=`yq -r '.main.multiSourceConfig.enabled // (.main.multiSourceConfig.enabled = "false")' values-global.yaml`;\
174+
if [ "$${OUT,,}" = "false" ]; then\
175+
echo "You must set \".main.multiSourceConfig.enabled: true\" in your 'values-global.yaml' file";\
176+
echo "because your common subfolder is the slimmed down version with no helm charts in it";\
177+
exit 1;\
178+
fi;\
179+
fi;\
173180
fi
174181

175182
.PHONY: argo-healthcheck

scripts/pattern-util.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@ function version {
88
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'
99
}
1010

11-
function check_for_clustergroup_multisource {
12-
if [ -f values-global.yaml ]; then
13-
# Query .main.multiSourceConfig.enabled and assume it is false if not set
14-
OUT=$(yq -r '.main.multiSourceConfig.enabled // (.main.multiSourceConfig.enabled = "false")')
15-
if [ "${OUT,,}" = "false" ]; then
16-
echo "You must set `.main.multiSourceConfig.enabled: true` in your 'values-global.yaml' file"
17-
echo "because your common subfolder is the slimmed down version with no helm charts in it"
18-
exit 1
19-
fi
20-
fi
21-
}
22-
2311
if [ -z "$PATTERN_UTILITY_CONTAINER" ]; then
2412
PATTERN_UTILITY_CONTAINER="quay.io/hybridcloudpatterns/utility-container"
2513
fi
@@ -78,10 +66,6 @@ else
7866
PKI_HOST_MOUNT_ARGS=""
7967
fi
8068

81-
# In the slimmed down common branch we need to check that multisource is enabled for the clustergroup
82-
# chart
83-
check_for_clustergroup_multisource
84-
8569
# Copy Kubeconfig from current environment. The utilities will pick up ~/.kube/config if set so it's not mandatory
8670
# $HOME is mounted as itself for any files that are referenced with absolute paths
8771
# $HOME is mounted to /root because the UID in the container is 0 and that's where SSH looks for credentials

0 commit comments

Comments
 (0)