-
Notifications
You must be signed in to change notification settings - Fork 134
69 lines (57 loc) · 2.01 KB
/
openshift.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: OpenShift Local Tests
on:
workflow_dispatch:
push:
branches:
- openshift-ci
jobs:
openshift:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Write pull secret file
run: |
echo "${{ secrets.OPENSHIFT_PULL_SECRET }}" | base64 -d > pull-secret.txt
- name: Fetch crc binary
run: |
CRC_VERSION="2.31.0"
wget -q https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/${CRC_VERSION}/crc-linux-amd64.tar.xz
tar -xvf crc-linux-amd64.tar.xz
sudo cp crc-linux-${CRC_VERSION}-amd64/crc /usr/bin/crc
sudo chmod a+x /usr/bin/crc
- name: Fetch oc binary
run: |
wget -q https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.14/openshift-client-linux.tar.gz
tar -xvf openshift-client-linux.tar.gz
sudo cp oc /usr/bin/oc
sudo chmod a+x /usr/bin/oc
- 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: Free up disk
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: |
crc config set consent-telemetry no
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
- name: Get crc info
run: |
export KUBECONFIG="/home/runner/.crc/machines/crc/kubeconfig"
oc get co