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 51a4f0b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
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 51a4f0b

Please sign in to comment.