feat: Redesign gitopsaddon to treat local-cluster as a fully managed cluster #315
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 | |
| on: | |
| workflow_dispatch: {} | |
| pull_request: | |
| branches: | |
| - main | |
| - release-* | |
| env: | |
| GO_VERSION: '1.24' | |
| GO_REQUIRED_MIN_VERSION: '' | |
| GOPATH: '/home/runner/work/multicloud-integrations/multicloud-integrations/go' | |
| defaults: | |
| run: | |
| working-directory: go/src/github.com/open-cluster-management/multicloud-integrations | |
| jobs: | |
| e2e: | |
| name: e2e | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Free up disk space | |
| run: | | |
| echo "Freeing up disk space..." | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune -af | |
| df -h | |
| working-directory: / | |
| - name: checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| path: go/src/github.com/open-cluster-management/multicloud-integrations | |
| - name: install Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: install imagebuilder | |
| run: go install github.com/openshift/imagebuilder/cmd/imagebuilder@v1.2.3 | |
| - name: build-images | |
| run: make build-images | |
| - name: setup kind | |
| uses: engineerd/setup-kind@v0.5.0 | |
| with: | |
| version: v0.25.0 | |
| name: cluster1 | |
| - name: setup kind | |
| uses: engineerd/setup-kind@v0.5.0 | |
| with: | |
| version: v0.25.0 | |
| name: hub | |
| - name: Load locally built image into Kind clusters | |
| run: | | |
| # Only the locally built image needs loading - it doesn't exist in any registry. | |
| # All other images (argocd, argocd-operator, redis) are in public registries | |
| # and will be pulled by the Kind nodes at runtime. | |
| docker save quay.io/stolostron/multicloud-integrations:latest | docker exec -i hub-control-plane ctr --namespace=k8s.io images import --snapshotter=overlayfs - | |
| docker save quay.io/stolostron/multicloud-integrations:latest | docker exec -i cluster1-control-plane ctr --namespace=k8s.io images import --snapshotter=overlayfs - | |
| - name: Run e2e test | |
| run: | | |
| make test-e2e | |
| env: | |
| KUBECONFIG: /home/runner/.kube/config | |
| - name: Run cluster secret deletion e2e test | |
| run: | | |
| make test-e2e-cluster-secret-deletion | |
| env: | |
| KUBECONFIG: /home/runner/.kube/config | |
| e2e-gitopsaddon: | |
| name: e2e-gitopsaddon (${{ matrix.scenario }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - scenario: embedded | |
| make_target: test-e2e-gitopsaddon-embedded | |
| - scenario: embedded-agent | |
| make_target: test-e2e-gitopsaddon-embedded-agent | |
| steps: | |
| - name: Free up disk space | |
| run: | | |
| echo "Freeing up disk space..." | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune -af | |
| df -h | |
| working-directory: / | |
| - name: checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 1 | |
| path: go/src/github.com/open-cluster-management/multicloud-integrations | |
| - name: install Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Add GOPATH/bin to PATH | |
| run: echo "$GOPATH/bin" >> "$GITHUB_PATH" | |
| - name: install imagebuilder | |
| run: go install github.com/openshift/imagebuilder/cmd/imagebuilder@v1.2.3 | |
| - name: build-images | |
| run: make build-images | |
| - name: setup kind (cluster1) | |
| uses: engineerd/setup-kind@v0.5.0 | |
| with: | |
| version: v0.25.0 | |
| name: cluster1 | |
| - name: setup kind (hub) | |
| uses: engineerd/setup-kind@v0.5.0 | |
| with: | |
| version: v0.25.0 | |
| name: hub | |
| - name: Load locally built image into Kind clusters | |
| run: | | |
| docker save quay.io/stolostron/multicloud-integrations:latest | docker exec -i hub-control-plane ctr --namespace=k8s.io images import --snapshotter=overlayfs - | |
| docker save quay.io/stolostron/multicloud-integrations:latest | docker exec -i cluster1-control-plane ctr --namespace=k8s.io images import --snapshotter=overlayfs - | |
| - name: Run e2e gitopsaddon (${{ matrix.scenario }}) | |
| env: | |
| KUBECONFIG: /home/runner/.kube/config | |
| run: make ${{ matrix.make_target }} |