Skip to content

Commit

Permalink
ci/microshift.sh: Add cmd to create service account with cluster-admi…
Browse files Browse the repository at this point in the history
…n role
  • Loading branch information
QuanMPhm committed Jan 30, 2024
1 parent 5b6634f commit ca52992
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions ci/microshift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,5 @@ while ! oc get route -A; do
done
echo "::endgroup::"

# Install OpenShift Account Management
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
echo "::endgroup::"

sleep 60
oc create sa coldfront
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:default:coldfront

0 comments on commit ca52992

Please sign in to comment.