Skip to content

Use okd preset

Use okd preset #18

Workflow file for this run

name: OpenShift Local Tests
on:
workflow_dispatch:
push:
branches:
- openshift-ci
jobs:
openshift:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
AWS_DEFAULT_REGION: us-east-1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@master
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
role-session-name: DCTerraformHelmSession
role-duration-seconds: 7200
- name: Fetch OpenShift binary
run: |
aws s3api get-object --bucket openshift-local --key crc crc
chmod +x crc
- name: Install required virtualization software
run: |
sudo apt-get update
sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system
sudo usermod -a -G libvirt $USER
- name: Remove unwanted stuff to free up disk image
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo swapoff -a
sudo rm -f /mnt/swapfile
- name: Set the crc config
run: |
mkdir -p ~/.crc/cache
echo "${{ secrets.OPENSHIFT_PULL_SECRET }}" > pull-secret.txt
cat pull-secret.txt
./crc config set consent-telemetry no
./crc config set preset okd
./crc config set network-mode user
- name: Setup the crc
run: sudo -su $USER ./crc setup
- name: Start the crc
run: sudo -su $USER ./crc start -p pull-secret.txt