Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Zhiwei Yin <[email protected]>
  • Loading branch information
zhiweiyin318 committed Dec 19, 2024
1 parent 754f72f commit 61903a3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,18 @@ 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
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: Setup tmate session after Tests Failed
uses: mxschmitt/action-tmate@v3
if: ${{ failure() }}
timeout-minutes: 120 # 120 minutes timeout
- name: Import hosted cluster
run: |
make e2e-import-cluster
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion hack/e2e-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ######"
Expand Down

0 comments on commit 61903a3

Please sign in to comment.