From afb3355fb38e24dd4f8a241a9e9c2f2a9b9eea9c Mon Sep 17 00:00:00 2001 From: Praveen M <30765265+iPraveenParihar@users.noreply.github.com> Date: Wed, 18 Dec 2024 07:54:24 +0000 Subject: [PATCH] workflow: e2e Signed-off-by: Praveen M <30765265+iPraveenParihar@users.noreply.github.com> --- .github/workflows/e2e.yaml | 83 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/e2e.yaml diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml new file mode 100644 index 00000000000..27ad32436ac --- /dev/null +++ b/.github/workflows/e2e.yaml @@ -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