Skip to content

Commit

Permalink
workflow: e2e
Browse files Browse the repository at this point in the history
Signed-off-by: Praveen M <[email protected]>
  • Loading branch information
iPraveenParihar committed Dec 18, 2024
1 parent 83b5454 commit afb3355
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: E2E

on:
workflow_dispatch:
inputs:
branch_name:
description: "The branch name to checkout and build"
required: false
default: "devel"
base_image:
description: "BASE_IMAGE to use for the image"
required: false
default: "quay.io/ceph/ceph:v19"
k8s_version:
description: "K8s version"
required: false
default: "v1.32.0"
test_rbd:
description: "Run RBD Tests"
required: false
default: "true"
test_cephfs:
description: "Run CephFS Tests"
required: false
default: "true"

jobs:
build-and-push:
runs-on: ubuntu-latest
env:
BASE_IMAGE: ${{ github.event.inputs.base_image }}
BRANCH_NAME: ${{ github.event.inputs.branch_name }}
TEST_RBD: ${{ github.event.inputs.test_rbd }}
TEST_CEPHFS: ${{ github.event.inputs.test_cephfs }}
K8S_VERSION: ${{ github.event.inputs.k8s_version }}

steps:
# Setup tmate session
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
detached: true

# Checkout repository code
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch_name }}

# Log in to GitHub Container Registry
- name: Log in to GitHub Container Registry
env:
GHCR: ${{ secrets.GHCR }}
run: echo "${GHCR}" | podman login ghcr.io -u ${{ github.actor }} --password-stdin

# Install Dependencies
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get -y install podman
# Install minikube
- name: Install minikube
uses: medyagh/setup-minikube@latest
with:
minikube-version: 1.34.0
kubernetes-version: ${{ github.event.inputs.k8s_version }}
cpus: 4
memory: 4000m
cni: bridge

# Prepare disks
- name: Prepare disks
run: |
echo -e "n\np\n\n\n+12G\nn\np\n\n\n+12G\nn\np\n\n\n+12G\nw" | fdisk /dev/xvdb
# Deploy Rook
- name: Deploy Rook
run: |
scripts/minikube.sh deploy-rook
scripts/minikube.sh create-block-pool
scripts/minikube.sh create-block-ec-pool
scripts/minikube.sh k8s-sidecar

0 comments on commit afb3355

Please sign in to comment.