Files
my-rook-config/.github/workflows/integration-test.yaml
T
subhamkrai 49a3511532 ci: manifests changes to run gh action
to run the integration test there needs
to be a few changes in manifests like using
`deviceFilter` and other related changes.

Signed-off-by: subhamkrai <srai@redhat.com>
2020-11-18 09:31:07 +05:30

307 lines
9.7 KiB
YAML

name: Integration test
on: [pull_request]
jobs:
TestCephSmokeSuite:
runs-on: ubuntu-latest
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.0.1
with:
minikube version: 'v1.13.1'
kubernetes version: 'v1.19.2'
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: TestCephSmokeSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1)
go test -v -timeout 1800s -run CephSmokeSuite github.com/rook/rook/tests/integration
- name: Artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: ceph-smoke-suite-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
TestCephFlexSuite:
runs-on: ubuntu-latest
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.0.1
with:
minikube version: 'v1.13.1'
kubernetes version: 'v1.19.2'
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/
TestCephUpgradeSuite:
runs-on: ubuntu-latest
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.0.1
with:
minikube version: 'v1.13.1'
kubernetes version: 'v1.19.2'
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: TestCephUpgradeSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1)
go test -v -timeout 1800s -run CephUpgradeSuite github.com/rook/rook/tests/integration
- name: Artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: ceph-upgrade-suite-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
TestCephMgrSuite:
runs-on: ubuntu-latest
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.0.1
with:
minikube version: 'v1.13.1'
kubernetes version: 'v1.19.2'
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: TestCephMgrSuite
run: |
export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1)
go test -v -timeout 1800s -run CephMgrSuite github.com/rook/rook/tests/integration
- name: Artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: ceph-mgr-suite-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
TestCephHelmSuite:
runs-on: ubuntu-latest
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.0.1
with:
minikube version: 'v1.13.1'
kubernetes version: 'v1.19.2'
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: TestCephHelmSuite
run: |
tests/scripts/minikube.sh helm
tests/scripts/helm.sh up
export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1)
go test -v -timeout 1800s -run CephHelmSuite github.com/rook/rook/tests/integration
- name: Artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: ceph-helm-suite-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/
TestCephMultiClusterDeploySuite:
runs-on: ubuntu-latest
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.0.1
with:
minikube version: 'v1.13.1'
kubernetes version: 'v1.19.2'
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: TestCephMultiClusterDeploySuite
run: |
export TEST_SCRATCH_DEVICE=$(sudo lsblk --paths|awk '/14G/ {print $1}'| head -1)1
export DEVICE_FILTER=$(lsblk|awk '/14G/ {print $1}'| head -1)
go test -v -timeout 1800s -run CephMultiClusterDeploySuite github.com/rook/rook/tests/integration
- name: Artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: ceph-multi-cluster-deploy-suite-artifact
path: /home/runner/work/rook/rook/tests/integration/_output/tests/