Skip to content

Commit c2f06a6

Browse files
openstack: Apply FeatureSet in manifest-test
With this patch, manifest-tests parse feature-set and feature-gates information from the environment variables `FEATURE_SET` and `FEATURE_GATES`. This change enables testing the generation of manifests in the CAPI flow.
1 parent 59cc24d commit c2f06a6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

hack/openstack/test-manifests.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,29 @@ print_help() {
3939
echo -e "\\t-t\\t\\tpath to the tests to be run (defaults to '${tests_dir}')"
4040
echo -e "\\t-p\\t\\tpersist artifacts: do not delete files generated by openshift-install"
4141
echo -e "\\t-r <regexp>\\trun: only run test cases that match the given regular expression"
42+
echo
43+
echo -e 'Parsed environment variables:'
44+
echo -e "\\tOS_CLOUD\\t\\ttarget OpenStack cloud (must match an entry in cloud.yaml)"
45+
echo -e "\\tFEATURE_SET\\t\\tsets the cluster feature set. This is used to enable custom features such as tech preview features."
46+
echo -e "\\tFEATURE_GATES\\t\\tcomma-separated list of cluster feature gates. This is used to enable custom features. Only to be used in conjunction with FEATURE_SET=CustomNoUpgrade."
4247
}
4348

4449
fill_install_config() {
4550
declare -r \
4651
template="$1" \
4752
pull_secret="'"'{"auths":{"registry.svc.ci.openshift.org":{"auth":"QW4gYWN0dWFsIHB1bGwgc2VjcmV0IGlzIG5vdCBuZWNlc3NhcnkK"}}}'"'"
4853

54+
if [[ -n "$FEATURE_SET" ]]; then
55+
echo "featureSet: '${FEATURE_SET}'"
56+
fi
57+
if [[ -n "$FEATURE_GATES" ]]; then
58+
echo 'featureGates:'
59+
IFS=',' read -ra gates <<< "$FEATURE_GATES"
60+
for gate in "${gates[@]}"; do
61+
echo "- ${gate}"
62+
done
63+
fi
64+
4965
sed '
5066
s|${\?OS_CLOUD}\?|'"${os_cloud}"'|;
5167
s|${\?EXTERNAL_NETWORK}\?|'"${external_network}"'|;

0 commit comments

Comments
 (0)