mover: fetch ceph-csi-config via k8s API instead of volume mount #64
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 Tests | |
| on: | |
| pull_request: | |
| 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 | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-e2e: | |
| name: Run on Ubuntu | |
| runs-on: ubuntu-latest | |
| env: | |
| CONTAINER_TOOL: docker | |
| IMG: localhost/ceph-volsync-plugin-operator:test | |
| MOVER_IMG: localhost/ceph-volsync-plugin-mover:test | |
| steps: | |
| - name: Clone the code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go | |
| uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.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@e9e035a86bbc3caea26a450bd4dbf9d0c453682e # v0.0.21 | |
| with: | |
| minikube-version: "1.38.0" | |
| kubernetes-version: v1.34.0 | |
| driver: none | |
| container-runtime: docker | |
| memory: 6g | |
| cpus: 2 | |
| cni: calico | |
| - name: Setup tmate session | |
| if: runner.debug == '1' | |
| uses: mxschmitt/action-tmate@v3 | |
| with: | |
| detached: true | |
| - name: Install Ceph development headers | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq \ | |
| librados-dev librbd-dev libcephfs-dev | |
| - name: Build and load container images | |
| run: | | |
| go mod tidy | |
| make manifests generate fmt vet check-uncommitted | |
| make docker-build IMG=$IMG | |
| make docker-build-mover MOVER_IMG=$MOVER_IMG | |
| make install | |
| - name: Install snapshot controller | |
| run: test/scripts/install_snapshot.sh install | |
| - name: Deploy Rook Ceph | |
| run: test/scripts/deploy_rook_ceph.sh install | |
| - name: Deploy ceph-volsync-plugin operator | |
| run: | | |
| sed -i \ | |
| 's/namespace: .*/namespace: rook-ceph/' \ | |
| config/default/kustomization.yaml | |
| make deploy IMG=$IMG MOVER_IMG=$MOVER_IMG | |
| kubectl -n rook-ceph wait --for=condition=available \ | |
| deployment/ceph-volsync-plugin-operator-controller-manager --timeout=5m | |
| - name: Install ginkgo | |
| run: > | |
| go install | |
| github.com/onsi/ginkgo/v2/ginkgo@$( | |
| go list -m -f '{{ .Version }}' | |
| github.com/onsi/ginkgo/v2) | |
| - name: Running Test e2e | |
| run: | | |
| ginkgo -v -p --timeout=30m ./test/e2e/ | |
| - name: Cleanup ceph-volsync-plugin operator | |
| if: success() # do not run this step if the previous steps have failed. | |
| run: | | |
| make undeploy | |
| make uninstall | |
| - name: Collect logs on failure | |
| if: failure() | |
| run: | | |
| kubectl -n rook-ceph get cephclusters.ceph.rook.io -o yaml || true | |
| kubectl -n rook-ceph get pods -o wide || true | |
| kubectl -n rook-ceph get events --sort-by='.lastTimestamp' || true | |
| # TODO: add more logs to collect for debugging as needed |