Skip to content

Commit 33983cd

Browse files
Merge pull request #789 from percona/fix-install-test-release-branch
Fix install test for release branch
2 parents 800a4f9 + 22760da commit 33983cd

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/test.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
fetch-depth: 0
2020

2121
- name: Set up Helm
22-
uses: azure/setup-helm@v4.2.0
22+
uses: azure/setup-helm@v4.3.1
2323
with:
24-
version: v3.15.4
24+
version: v3.20.0
2525

2626
- uses: actions/setup-python@v5
2727
with:
@@ -48,11 +48,26 @@ jobs:
4848

4949
- name: Run chart-testing (install)
5050
run: |
51-
OPERATOR_INSTALL=$(ct list-changed --config .github/ct.yaml | sed 's:charts/::' | grep "\-db$" | sed 's/-db$/-operator/')
51+
echo "Base branch is $GITHUB_BASE_REF"
52+
excluded_charts=("everest")
53+
OPERATOR_INSTALL=$(ct list-changed --config .github/ct.yaml | sed -E 's:charts/::' | awk '/(-db|-operator)$/ { sub(/-db$/, "-operator"); print }' | sort -u)
54+
5255
if [ -n "$OPERATOR_INSTALL" ]; then
53-
for operator in $OPERATOR_INSTALL; do helm install --namespace default $operator charts/$operator/.; done
56+
for operator in $OPERATOR_INSTALL; do
57+
HELM_ARGS=()
58+
if [[ "$GITHUB_BASE_REF" == release-* ]]; then
59+
IMAGE_NAME=$(yq e '.image.repository' "charts/$operator/values.yaml" | awk -F/ '{print $NF}')
60+
HELM_ARGS=(
61+
--set "image.repository=perconalab/$IMAGE_NAME"
62+
--set "image.tag=main"
63+
)
64+
fi
65+
helm install --namespace default $operator charts/$operator/. --wait --debug "${HELM_ARGS[@]}"
66+
excluded_charts+=($operator)
67+
done
5468
fi
55-
ct install --config .github/ct.yaml --excluded-charts=everest,pmm-ha,pmm-ha-dependencies
69+
70+
ct install --config .github/ct.yaml --excluded-charts=$(IFS=,; echo "${excluded_charts[*]}")
5671
5772
if [ -n "$OPERATOR_INSTALL" ]; then
5873
for operator in $OPERATOR_INSTALL; do helm uninstall --namespace default $operator; done

0 commit comments

Comments
 (0)