ci: Add basic tests for built kas and kas-isar containers
Break up the build into two stages, performing basic tests with poky and isar on the two kas container types before uploading them. The tests consist of building zlib-native with poky and cowsay for x86 bullseye with Isar. Note that the ordering "build kas", "test kas", "push kas", "build kas-isar" is important because "build kas-isar" will not use the locally built and imported kas:next image and rather pull the previous one from the registry. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
30
.github/workflows/next.yml
vendored
30
.github/workflows/next.yml
vendored
@@ -61,8 +61,8 @@ jobs:
|
||||
scripts/checkcode.sh .
|
||||
TERM=xterm pytest
|
||||
|
||||
deploy_containers:
|
||||
name: Build and deploy container images
|
||||
build_containers:
|
||||
name: Build, test and deploy container images
|
||||
needs: perform_tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -81,14 +81,34 @@ jobs:
|
||||
- name: Build kas image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
load: true
|
||||
tags: ghcr.io/siemens/kas/kas:next
|
||||
- name: Test kas image
|
||||
run: |
|
||||
cd image-tests/poky
|
||||
KAS_IMAGE_VERSION=next ../../kas-container build kas.yml
|
||||
- name: Complete build and deploy kas image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ghcr.io/siemens/kas/kas:next
|
||||
push: true
|
||||
- name: Build kas-isar image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: Dockerfile.isar
|
||||
load: true
|
||||
build-args: KAS_TAG=next
|
||||
tags: ghcr.io/siemens/kas/kas-isar:next
|
||||
- name: Test kas-isar image
|
||||
run: |
|
||||
cd image-tests/isar
|
||||
KAS_IMAGE_VERSION=next ../../kas-container build kas.yml
|
||||
- name: Complete build and deploy kas-isar image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: Dockerfile.isar
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build-args: KAS_TAG=next
|
||||
push: true
|
||||
tags: ghcr.io/siemens/kas/kas-isar:next
|
||||
push: true
|
||||
|
Reference in New Issue
Block a user