Skip to content

Commit

Permalink
use new library
Browse files Browse the repository at this point in the history
  • Loading branch information
NiniOak committed Oct 16, 2024
1 parent 6f97ccc commit 9643b89
Showing 1 changed file with 16 additions and 32 deletions.
48 changes: 16 additions & 32 deletions .github/workflows/openshift-acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9643b89

Please sign in to comment.