diff --git a/.github/workflows/openshift-acceptance.yml b/.github/workflows/openshift-acceptance.yml index 6e51600ab7..633b48423f 100644 --- a/.github/workflows/openshift-acceptance.yml +++ b/.github/workflows/openshift-acceptance.yml @@ -18,52 +18,36 @@ jobs: with: fetch-depth: 0 - - name: Install dependencies + - name: Install OpenShift Tools + uses: redhat-actions/openshift-tools-installer@v1 + with: + source: github + crc: latest + oc: latest + + - name: Verify installations run: | - sudo apt-get update - sudo apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils xz-utils + crc version + oc version - - name: Add user to libvirt group + - name: Setup and start CRC run: | sudo usermod -a -G libvirt $USER sudo systemctl enable libvirtd sudo systemctl start libvirtd - echo "User added to libvirt group" - id - - - name: Set up OpenShift Local - run: | - # Get the latest CRC version and URL - CRC_URL="https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" - curl -sL ${CRC_URL} | sudo tar -xJf - -C /tmp - sudo mv /tmp/crc-linux-*-amd64/crc /usr/local/bin/ - crc version - # Setup and start CRC bash -c "newgrp libvirt << EOF crc setup crc config set consent-telemetry no crc start --memory 13312 --cpus 4 --yes EOF" -# CRC_URL="https://mirror.openshift.com/pub/openshift-v4/clients/crc/latest/crc-linux-amd64.tar.xz" -# curl -sL ${CRC_URL} | tar -xJf - -C /tmp -# sudo mv /tmp/crc-linux-*-amd64/crc /usr/local/bin/ -# crc version - -# # Setup and start CRC -# sg libvirt -c "crc setup" -# sg libvirt -c "crc config set consent-telemetry no" -# sg libvirt -c "crc start --memory 13312 --cpus 4 --yes" - - - name: Set up OpenShift CLI - run: | - eval $(sudo -E env "PATH=$PATH" crc oc-env) - oc version - - name: Login to OpenShift + - name: Verify CRC status run: | - eval $(sudo -E env "PATH=$PATH" crc oc-env) - oc login -u developer -p developer https://api.crc.testing:6443 --insecure-skip-tls-verify=true + crc status + eval $(crc oc-env) + oc login -u developer -p developer https://api.crc.testing:6443 + oc get nodes - name: Setup helm uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0