merge queue: checking main (d4d7fea) and #1081 together #236
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: e2e | |
| # yamllint disable rule:line-length | |
| # yamllint disable-line rule:truthy | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - release-* | |
| defaults: | |
| run: | |
| # reference: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell | |
| shell: bash --noprofile --norc -eo pipefail -x {0} | |
| # cancel the in-progress workflow when PR is refreshed. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| TAG: test | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: ceph | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: Install cri-dockerd | |
| run: | | |
| ARCH="$(go env GOARCH)" | |
| curl -LO "https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.21/cri-dockerd_0.3.21.3-0.ubuntu-focal_${ARCH}.deb" | |
| sudo dpkg -i "cri-dockerd_0.3.21.3-0.ubuntu-focal_${ARCH}.deb" | |
| rm -f "cri-dockerd_0.3.21.3-0.ubuntu-focal_${ARCH}.deb" | |
| - name: Setup Minikube | |
| uses: medyagh/setup-minikube@latest | |
| with: | |
| # lock minikube version to ensure release branch CI doesn't fail when latest minikube no | |
| # longer supports older k8s version we lock to | |
| minikube-version: "1.38.0" | |
| kubernetes-version: "1.31.0" | |
| driver: none | |
| container-runtime: docker | |
| memory: 6g | |
| cpus: 2 | |
| addons: ingress | |
| cni: calico | |
| - name: checkout rook release | |
| run: test/scripts/ceph/github-action-helper.sh checkout_rook_release "v1.19.1" | |
| - name: install deps | |
| run: test/scripts/ceph/github-action-helper.sh install_deps | |
| - name: print k8s cluster status | |
| run: test/scripts/ceph/github-action-helper.sh print_k8s_cluster_status | |
| - name: use local disk into two partitions | |
| run: | | |
| test/scripts/ceph/github-action-helper.sh use_local_disk | |
| BLOCK=$(test/scripts/ceph/github-action-helper.sh find_extra_block_dev) | |
| export BLOCK="/dev/${BLOCK}" | |
| test/scripts/ceph/github-action-helper.sh create_bluestore_partitions --disk "$BLOCK" --osd-count 2 | |
| sudo lsblk | |
| - name: build sidecar image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: build/Containerfile.sidecar | |
| push: false | |
| tags: quay.io/csiaddons/k8s-sidecar:${{ env.TAG }} | |
| - name: push sidecar image to minikube | |
| run: > | |
| minikube | |
| image load quay.io/csiaddons/k8s-sidecar:${{ env.TAG }} | |
| - name: deploy ceph clusters | |
| run: | | |
| test/scripts/ceph/github-action-helper.sh deploy_rook | |
| test/scripts/ceph/github-action-helper.sh deploy_first_ceph_cluster | |
| test/scripts/ceph/github-action-helper.sh deploy_second_ceph_cluster | |
| - name: enable mirroring between clusters | |
| run: | | |
| test/scripts/ceph/github-action-helper.sh enable_mirroring_cluster rook-ceph rook-ceph-secondary | |
| - name: Build controller container image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: false | |
| tags: quay.io/csiaddons/k8s-controller:${{ env.TAG }} | |
| - name: push controller image to minikube | |
| run: > | |
| minikube | |
| image load quay.io/csiaddons/k8s-controller:${{ env.TAG }} | |
| - name: Deploy the controller and CRDs | |
| run: make deploy TAG=${{ env.TAG }} | |
| - name: Wait for controller pod creation | |
| run: > | |
| kubectl | |
| -n csi-addons-system | |
| wait pods | |
| -l app.kubernetes.io/name=csi-addons | |
| --for=create | |
| --timeout=5m | |
| - name: Wait for running controller pod | |
| run: > | |
| kubectl | |
| -n csi-addons-system | |
| wait pods | |
| -l app.kubernetes.io/name=csi-addons | |
| --for=condition=Ready=True | |
| --timeout=5m | |
| - name: Run e2e tests | |
| run: | | |
| export KUBECONFIG="$HOME"/.kube/config | |
| echo "$HOME"/.kube/config | |
| make copy-ceph-e2e-config | |
| make test-e2e | |
| - name: Capture debug info on failure | |
| if: failure() | |
| run: test/scripts/ceph/collect-debug-info.sh |