this commit enables IT to run on multiple k8s version and for master/release, all the 5 k8s version 'v1.15.12','v1.16.15','v1.18.15','v1.19.7','v1.20.0' similar to jenkins. Signed-off-by: subhamkrai <srai@redhat.com>
118 lines
3.9 KiB
YAML
118 lines
3.9 KiB
YAML
name: Integration test CephFlexSuite
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
TestCephFlexSuite:
|
|
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' }}
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: setup golang
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.15
|
|
|
|
- name: setup minikube
|
|
uses: manusa/actions-setup-minikube@v2.3.1
|
|
with:
|
|
minikube version: 'v1.13.1'
|
|
kubernetes version: 'v1.15.12'
|
|
start args: --memory 6g --cpus=2
|
|
|
|
- name: check k8s cluster status
|
|
run: |
|
|
kubectl cluster-info
|
|
kubectl get pods -n kube-system
|
|
|
|
- name: use local disk
|
|
run: |
|
|
sudo swapoff --all --verbose
|
|
sudo umount /mnt
|
|
# search for the device since it keeps changing between sda and sdb
|
|
sudo wipefs --all --force /dev/$(lsblk|awk '/14G/ {print $1}'| head -1)1
|
|
sudo lsblk
|
|
|
|
- name: build rook
|
|
run: |
|
|
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
|
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
|
docker images
|
|
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
|
|
|
- name: TestCephFlexSuite
|
|
run: |
|
|
export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1)
|
|
go test -v -timeout 1800s -run CephFlexSuite github.com/rook/rook/tests/integration
|
|
|
|
- name: Artifact
|
|
uses: actions/upload-artifact@v2
|
|
if: failure()
|
|
with:
|
|
name: ceph-flex-suite-artifact
|
|
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
|
|
|
|
- name: setup tmate session for debugging
|
|
if: failure() && contains(github.event.pull_request.labels.*.name, 'debug-flex-suite')
|
|
uses: mxschmitt/action-tmate@v3
|
|
|
|
TestCephFlexSuite-Master:
|
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/tags/release-*'
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
kubernetes-versions : ['v1.15.12','v1.16.15','v1.18.15','v1.19.7','v1.20.2']
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: setup golang
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.15
|
|
|
|
- name: setup minikube
|
|
uses: manusa/actions-setup-minikube@v2.3.1
|
|
with:
|
|
minikube version: 'v1.13.1'
|
|
kubernetes version: ${{ matrix.kubernetes-versions }}
|
|
start args: --memory 6g --cpus=2
|
|
|
|
- name: check k8s cluster status
|
|
run: |
|
|
kubectl cluster-info
|
|
kubectl get pods -n kube-system
|
|
|
|
- name: use local disk
|
|
run: |
|
|
sudo swapoff --all --verbose
|
|
sudo umount /mnt
|
|
# search for the device since it keeps changing between sda and sdb
|
|
sudo wipefs --all --force /dev/$(lsblk|awk '/14G/ {print $1}'| head -1)1
|
|
sudo lsblk
|
|
|
|
- name: build rook
|
|
run: |
|
|
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
|
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
|
docker images
|
|
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
|
|
|
- name: TestCephFlexSuite
|
|
run: |
|
|
export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1)
|
|
go test -v -timeout 1800s -run CephFlexSuite github.com/rook/rook/tests/integration
|
|
|
|
- name: Artifact
|
|
uses: actions/upload-artifact@v2
|
|
if: failure()
|
|
with:
|
|
name: ceph-flex-suite-artifact
|
|
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
|
|
|
|
- name: setup tmate session for debugging
|
|
if: failure() && contains(github.event.pull_request.labels.*.name, 'debug-flex-suite')
|
|
uses: mxschmitt/action-tmate@v3
|