From 51a4f0bbc1f6d7f90b6a48293098b306b64ef8bd 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 | 17 +++++++++++++++-- Makefile | 2 +- hack/e2e-install.sh | 18 +++++++++++++++++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index a3af9b7..ecddb67 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -24,6 +24,14 @@ jobs: if: ${{ env.ACT }} # this step only runs locally when using the https://github.com/nektos/act to debug the e2e - name: Checkout uses: actions/checkout@v4 + - name: test secret + run: | + echo ${{ secrets.IMAGE_PULL_SECRET }} > secret1 + echo ${IMAGE_PULL_SECRET} >> secret2 + cat secret1 + cat secret2 + env: + IMAGE_PULL_SECRET: ${{ secrets.IMAGE_PULL_SECRET }} - name: Setup Go uses: actions/setup-go@v5 with: @@ -61,11 +69,16 @@ jobs: kind get kubeconfig --internal --name spoke > /home/runner/.kube/spoke-internal-kubeconfig - name: Install MCE+Policy run: | + echo ${IMAGE_PULL_SECRET} > dat1 + echo ${{ secrets.IMAGE_PULL_SECRET }} > dat2 + cat dat1 + cat dat2 make e2e-install 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 + IMAGE_PULL_SECRET: ${{ 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..60d6bdd 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 ######"