Skip to content

Commit

Permalink
ci: separate builds for fluence and sidecar
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Dec 17, 2023
1 parent d842be8 commit ad0c121
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
74 changes: 69 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/[email protected]
with:
cluster_name: kind
Expand Down

0 comments on commit ad0c121

Please sign in to comment.