Skip to content

Commit

Permalink
ci : Add github action workflow for okd 4.14.0 cluster with crc
Browse files Browse the repository at this point in the history
Signed-off-by: Rohan Kumar <[email protected]>
  • Loading branch information
rohanKanojia committed Oct 8, 2024
1 parent 0589ad7 commit 858211b
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,82 @@ jobs:
oc login -u system:admin
oc describe node localhost
oc login -u developer
openshift-kubernetes-distribution:
name: OKD
needs: build-jkube
runs-on: ubuntu-latest
env:
SHELL: /bin/bash
strategy:
fail-fast: false
matrix:
# OKD version is bound to crc version
okd: [v4.14.0]
crc: [2.32.0]
suite: [ 'quarkus','springboot','webapp','other' ]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Cache configuration
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: |
~/.m2/repository
./jkube
key: cache-it-${{ github.run_id }}
- name: Setup Java 11
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0
with:
java-version: '11'
distribution: 'temurin'
- 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
sudo adduser $USER libvirt
sudo adduser $USER kvm
sudo usermod -a -G libvirt $USER
- name: Download CRC
run: |
wget https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/${{ matrix.crc }}/crc-linux-amd64.tar.xz
tar -xJf crc-linux-amd64.tar.xz
sudo cp crc-linux-${{ matrix.crc }}-amd64/crc /usr/local/bin/crc
- name: Set the crc config
run: |
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
- name: Login into OpenShift Cluster
run: |
sudo -su $USER eval $(crc oc-env)
sudo -su $USER oc version
LOGIN_COMMAND=`sudo -su $USER crc console --credentials | grep admin | awk -F"'" '$0=$2'`
eval $LOGIN_COMMAND
sudo -su $USER oc api-resources
- name: Install and Run Integration Tests
run: |
JKUBE_VERSION=$(./mvnw -q -f 'jkube/pom.xml' -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) \
&& ./mvnw -B -POpenShift,${{ matrix.suite }} verify -Djkube.version="$JKUBE_VERSION" -Djunit.jupiter.execution.parallel.config.fixed.parallelism=4
- name: Save reports as artifact
if: always()
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: Test reports (OKD ${{ matrix.okd }}-${{ matrix.suite }})
path: ./it/target/jkube-test-report.txt

0 comments on commit 858211b

Please sign in to comment.