diff --git a/.github/test.sh b/.github/test.sh index d3644f3..23c3f52 100755 --- a/.github/test.sh +++ b/.github/test.sh @@ -33,8 +33,8 @@ echo "Found fluence pod ${fluence_pod}" # Show logs for debugging, if needed echo -echo "⭐️ kubectl logs ${fluence_pod}" -kubectl logs ${fluence_pod} +echo "⭐️ kubectl logs ${fluence_pod} -c sidecar" +kubectl logs ${fluence_pod} -c sidecar echo echo "⭐️ kubectl logs ${fluence_pod} -c scheduler-plugins-scheduler" kubectl logs ${fluence_pod} -c scheduler-plugins-scheduler diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0a5cfab..f46eb3b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,58 @@ on: - cron: '0 0 * * 0' jobs: + build-fluence: + env: + container: ghcr.io/flux-framework/fluence + runs-on: ubuntu-latest + name: build fluence + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v3 + with: + go-version: ^1.19 + + - name: Build Containers + run: | + make prepare + make build REGISTRY=ghcr.io/flux-framework SCHEDULER_IMAGE=fluence + + - name: Save Container + run: docker save ${{ env.container }} | gzip > fluence_latest.tar.gz + + - name: Upload container artifact + uses: actions/upload-artifact@v2 + with: + name: fluence + path: fluence_latest.tar.gz + + build-sidecar: + env: + container: ghcr.io/flux-framework/fluence-sidecar + runs-on: ubuntu-latest + name: build sidecar + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v3 + with: + go-version: ^1.19 + + - name: Build Container + run: | + make prepare + make build-sidecar REGISTRY=ghcr.io/flux-framework SIDECAR_IMAGE=fluence-sidecar + + - name: Save Container + run: docker save ${{ env.container }} | gzip > fluence_sidecar_latest.tar.gz + + - name: Upload container artifact + uses: actions/upload-artifact@v2 + with: + name: fluence_sidecar + path: fluence_sidear_latest.tar.gz + test-fluence: + needs: [build-fluence, build-sidecar] permissions: packages: write env: @@ -25,13 +76,26 @@ jobs: with: go-version: ^1.19 - - name: Build Containers + - name: Download fluence artifact + uses: actions/download-artifact@v2 + with: + name: fluence + path: /tmp + + - name: Download fluence_sidecar artifact + uses: actions/download-artifact@v2 + with: + name: fluence_sidecar + path: /tmp + + - name: Load Docker images run: | - make prepare - make build REGISTRY=ghcr.io/flux-framework SCHEDULER_IMAGE=fluence - make build-sidecar REGISTRY=ghcr.io/flux-framework SIDECAR_IMAGE=fluence-sidecar + ls /tmp/*.tar.gz + docker load --input /tmp/fluence_sidecar_latest.tar.gz + docker load --input /tmp/fluence_latest.tar.gz + docker image ls -a | grep fluence - - name: CreateKind Cluster + - name: Create Kind Cluster uses: helm/kind-action@v1.5.0 with: cluster_name: kind