Skip to content

Commit 9de4d9a

Browse files
ci: fix GitHub action to test make test-e2e for deploy-image
For the DeployImage sample, we are only using validating webhooks. This commit updates the scaffold to reflect this by customizing the configuration accordingly. Additionally, there is a known bug in the tool where it scaffolds uncommented data for MutatingWebhooks. As a workaround, this commit comments out the unnecessary MutatingWebhook configurations to avoid issues during the test execution.
1 parent d3ce905 commit 9de4d9a

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.github/workflows/test-e2e-samples.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
KUSTOMIZATION_FILE_PATH="testdata/project-v4/config/default/kustomization.yaml"
4040
sed -i '25s/^#//' $KUSTOMIZATION_FILE_PATH
4141
sed -i '51s/^#//' $KUSTOMIZATION_FILE_PATH
42+
sed -i '55,151s/^#//' $KUSTOMIZATION_FILE_PATH
4243
cd testdata/project-v4/
4344
go mod tidy
4445
make generate
@@ -49,19 +50,34 @@ jobs:
4950
run: |
5051
make test-e2e
5152
53+
- name: Teardown kind cluster
54+
run: kind delete cluster
55+
56+
- name: Create kind cluster
57+
run: kind create cluster
58+
5259
- name: Prepare project-v4-with-deploy-image
5360
run: |
5461
KUSTOMIZATION_FILE_PATH="testdata/project-v4-with-deploy-image/config/default/kustomization.yaml"
5562
sed -i '25s/^#//' $KUSTOMIZATION_FILE_PATH
5663
sed -i '51s/^#//' $KUSTOMIZATION_FILE_PATH
64+
# Uncomment only ValidatingWebhookConfiguration
65+
# from cert-manager replaces
66+
sed -i '55,70s/^#//' $KUSTOMIZATION_FILE_PATH
67+
sed -i '55,70s/^#//' $KUSTOMIZATION_FILE_PATH
68+
sed -i '79,101s/^#//' $KUSTOMIZATION_FILE_PATH
69+
sed -i '110,151s/^#//' $KUSTOMIZATION_FILE_PATH
70+
# Comment the injection for MutatingWebhookConfiguration
71+
# Fixme: We should not scaffold or it should be commented
72+
# by default when only validation webhooks are scaffolded
73+
WEBHOOK_INJECTION_FILE_PATH="testdata/project-v4-with-deploy-image/config/default/webhookcainjection_patch.yaml"
74+
sed -i '3,11s/^/#/' $WEBHOOK_INJECTION_FILE_PATH
5775
cd testdata/project-v4-with-deploy-image/
5876
go mod tidy
5977
make generate
6078
make manifests
6179
62-
# Fixme: The e2e tests for deploy image are failing and we
63-
# need to fix in a follow up
64-
# - name: Testing make test-e2e for project-v4-with-deploy-image
65-
# working-directory: testdata/project-v4-with-deploy-image
66-
# run: |
67-
# make test-e2e
80+
- name: Testing make test-e2e for project-v4-with-deploy-image
81+
working-directory: testdata/project-v4-with-deploy-image
82+
run: |
83+
make test-e2e

0 commit comments

Comments
 (0)