From 9070ea08e45e8796380a2d9e274989238573c7d2 Mon Sep 17 00:00:00 2001 From: Quan Pham Date: Fri, 12 Jan 2024 10:20:14 -0500 Subject: [PATCH] Modified ci script to pull image from ghcr --- .../workflows/test-py39-functional-microshift.yaml | 2 +- ci/microshift.sh | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test-py39-functional-microshift.yaml b/.github/workflows/test-py39-functional-microshift.yaml index 7160ff0..e3470d8 100644 --- a/.github/workflows/test-py39-functional-microshift.yaml +++ b/.github/workflows/test-py39-functional-microshift.yaml @@ -9,7 +9,7 @@ on: env: PYTHONWARNINGS: ignore KUBECONFIG: ${{ github.workspace }}/kubeconfig - ACCT_MGT_VERSION: "6fdbf84e12cf67fc0e288df72788fa77d976ff0e" + ACCT_MGT_VERSION: "6012025c247ab25fb2cab3be9ad06080e28713ee" jobs: build: diff --git a/ci/microshift.sh b/ci/microshift.sh index c423f19..660ad5b 100755 --- a/ci/microshift.sh +++ b/ci/microshift.sh @@ -11,16 +11,13 @@ test_dir="$PWD/testdata" rm -rf "$test_dir" mkdir -p "$test_dir" -sudo docker rm -f microshift registry +sudo docker rm -f microshift sudo docker volume rm -f microshift-data -registry_port=$(( RANDOM % 1000 + 10000 )) - echo "::group::Start microshift container" sudo docker run -d --rm --name microshift --privileged \ --hostname microshift \ -v microshift-data:/var/lib \ - -p "${registry_port}:5000" \ quay.io/microshift/microshift-aio:latest echo "::endgroup::" @@ -28,10 +25,6 @@ microshift_addr=$(sudo docker inspect microshift -f '{{ .NetworkSettings.IPAddre sudo sed -i '/onboarding-onboarding.cluster.local/d' /etc/hosts echo "$microshift_addr onboarding-onboarding.cluster.local" | sudo tee -a /etc/hosts -echo "::group::Start registry container" -sudo docker run -d --name registry --network container:microshift registry:2 -echo "::endgroup::" - KUBECONFIG_FULL_PATH="$(readlink -f "$KUBECONFIG")" mkdir -p "${KUBECONFIG_FULL_PATH%/*}" @@ -56,11 +49,6 @@ git clone "${ACCT_MGT_REPOSITORY}" "$test_dir/openshift-acct-mgt" git -C "$test_dir/openshift-acct-mgt" config advice.detachedHead false git -C "$test_dir/openshift-acct-mgt" checkout "$ACCT_MGT_VERSION" -echo "::group::Build openshift-acct-mgt image" -sudo docker build "$test_dir/openshift-acct-mgt" -t "127.0.0.1:${registry_port}/cci-moc/openshift-acct-mgt:latest" -sudo docker push "127.0.0.1:${registry_port}/cci-moc/openshift-acct-mgt:latest" -echo "::endgroup::" - echo "::group::Deploy openshift-acct-mgt" oc apply -k "$test_dir/openshift-acct-mgt/k8s/overlays/crc" oc wait -n onboarding --for=condition=available --timeout=800s deployment/onboarding