From da45553d071c1a5929e9a6645b230d6e1ba3fa2b Mon Sep 17 00:00:00 2001 From: Zhiwei Yin Date: Thu, 19 Dec 2024 22:17:38 +0800 Subject: [PATCH] test Signed-off-by: Zhiwei Yin --- .github/workflows/e2e.yaml | 8 ++++++-- Makefile | 2 +- hack/e2e-install.sh | 18 +++++++++++++++++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index a3af9b7..4dd4737 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -61,11 +61,15 @@ jobs: kind get kubeconfig --internal --name spoke > /home/runner/.kube/spoke-internal-kubeconfig - name: Install MCE+Policy run: | + echo ${PULLSECRET} > /home/runner/pullsecret.json + echo TEST: "${TEST}" > /home/runner/test.json make e2e-install + secrets: inherit env: KUBECONFIG: /home/runner/.kube/hub-kubeconfig - USERNAME: ${{ secrets.IMAGE_PULL_SECRET_USER_NAME }} - TOKEN: ${{ secrets.IMAGE_PULL_SECRET_TOKEN }} + PULLSECRETFILE: /home/runner/pullsecret.json + PULLSECRET: ${{ secrets.IMAGE_PULL_SECRET }} + TEST: ${{ secrets.PULL_SECRET }} - name: Import hosted cluster run: | make e2e-import-cluster diff --git a/Makefile b/Makefile index bba9092..97d09c2 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ install-policy: ensure-helm $(HELM) upgrade --install policy ./policy install-e2e-mce: ensure-helm - $(HELM) upgrade --install mce ./hack/mce-chart -f ./test/configuration/mce-values.yaml --set mceVersion=$(MCEVersion),images.tag=$(Tag),images.imageCredentials.userName=$(UserName),images.imageCredentials.password=$(Password) + $(HELM) upgrade --install mce ./hack/mce-chart -f ./test/configuration/mce-values.yaml --set mceVersion=$(MCEVersion),images.tag=$(Tag),images.imageCredentials.userName=$(UserName),images.imageCredentials.password=$(Password) --set-file images.imageCredentials.dockerConfigJson=$(ImageCredentials) install-e2e-policy: ensure-helm $(HELM) upgrade --install policy ./policy -f ./test/configuration/policy-values.yaml diff --git a/hack/e2e-install.sh b/hack/e2e-install.sh index b5624e1..9a7278e 100755 --- a/hack/e2e-install.sh +++ b/hack/e2e-install.sh @@ -42,7 +42,23 @@ function waitForReady() { echo "" echo "#### Install MCE on Hub cluster ####" -UserName=$USERNAME Password=$TOKEN make install-e2e-mce +echo "1" +cat "$KUBECONFIG" +echo "2" +cat "$PULLSECRETFILE" +echo "3" +echo "$PULLSECRET" +echo "4" +cat /home/runner/test.json +echo "5" +echo "$TEST" +echo "6" +echo ${PULLSECRET} > /home/runner/pullsecret.json +echo TEST: "${TEST}" > /home/runner/test.json +cat /home/runner/test.json +cat /home/runner/pullsecret.json + +ImageCredentials="$PULLSECRETFILE" make install-e2e-mce echo "" echo "###### Wait until MCE pod is running ######"