-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve build by building the images only once (#1538)
Co-authored-by: Tamir David <[email protected]>
- Loading branch information
1 parent
78ee95e
commit e3f2416
Showing
1 changed file
with
51 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,36 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
build-odigos-images: | ||
runs-on: warp-ubuntu-latest-x64-8x-spot | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build CLI | ||
run: | | ||
cd cli | ||
go build -tags=embed_manifests -o odigos | ||
- name: Build Odigos Images | ||
run: | | ||
TAG=e2e-test make build-images | ||
docker save -o odigos-images.tar $(docker images --format "{{.Repository}}:{{.Tag}}" | grep "odigos") | ||
- name: Upload CLI | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: odigos-cli | ||
path: cli/odigos | ||
|
||
- name: Upload Odigos Images | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: odigos-images | ||
path: odigos-images.tar | ||
|
||
kubernetes-test: | ||
needs: build-odigos-images | ||
runs-on: warp-ubuntu-latest-x64-8x-spot | ||
strategy: | ||
fail-fast: false | ||
|
@@ -31,8 +60,7 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
|
@@ -41,29 +69,43 @@ jobs: | |
cache: true | ||
cache-dependency-path: | | ||
**/go.sum | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.9.0 | ||
|
||
- name: Install chainsaw | ||
uses: kyverno/[email protected] | ||
|
||
- name: Create Kind Cluster | ||
uses: helm/[email protected] | ||
with: | ||
node_image: ${{ matrix.kind-image }} | ||
version: "v0.23.0" | ||
cluster_name: kind | ||
|
||
- name: Install FE | ||
run: | | ||
cd frontend/webapp | ||
yarn install | ||
- name: Build CLI | ||
run: | | ||
cd cli | ||
go build -tags=embed_manifests -o odigos | ||
- name: Build and Load Odigos Images | ||
run: | | ||
TAG=e2e-test make build-images load-to-kind | ||
- name: Download and Load Docker Images to Kind | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: odigos-images | ||
- run: | | ||
docker load -i odigos-images.tar | ||
TAG=e2e-test make load-to-kind | ||
- name: Download CLI binary | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: odigos-cli | ||
- run: | | ||
mv odigos cli/odigos | ||
chmod +x cli/odigos | ||
- name: Run E2E Tests | ||
run: | | ||
chainsaw test tests/e2e/${{ matrix.test-scenario }} |