Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action fix #133

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-py39-functional-microshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
PYTHONWARNINGS: ignore
KUBECONFIG: ${{ github.workspace }}/kubeconfig
ACCT_MGT_VERSION: "6fdbf84e12cf67fc0e288df72788fa77d976ff0e"
ACCT_MGT_VERSION: "6012025c247ab25fb2cab3be9ad06080e28713ee"

jobs:
build:
Expand Down
14 changes: 1 addition & 13 deletions ci/microshift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,20 @@ 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::"

microshift_addr=$(sudo docker inspect microshift -f '{{ .NetworkSettings.IPAddress }}')
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%/*}"

Expand All @@ -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
Expand Down
Loading