diff --git a/.github/workflows/wkdev-sdk.yml b/.github/workflows/wkdev-sdk.yml index 7d04a71..dfb1786 100644 --- a/.github/workflows/wkdev-sdk.yml +++ b/.github/workflows/wkdev-sdk.yml @@ -36,7 +36,10 @@ jobs: remove-haskell: true remove-codeql: true remove-docker-images: true - + + - name: Install qemu-user-static + run: sudo apt-get -y install qemu-user-static + - name: Install podman uses: gacts/install-podman@v1 diff --git a/scripts/host-only/wkdev-sdk-bakery b/scripts/host-only/wkdev-sdk-bakery index b7ae6b6..aa35a1e 100755 --- a/scripts/host-only/wkdev-sdk-bakery +++ b/scripts/host-only/wkdev-sdk-bakery @@ -19,6 +19,7 @@ argsparse_use_option =verbose "Increase verbosity of this script" argsparse_use_option =name: "Name of container image" mandatory default:wkdev-sdk argsparse_use_option =mode: "Operation mode: 'build', 'deploy', or 'export'" mandatory +argsparse_use_option =platforms: "Build container for given set of platforms" mandatory default:"linux/arm/v7,linux/amd64" argsparse_use_option idle-cores: "Number of CPU cores to leave idle, when building the image" type:uint default:2 argsparse_usage_description="$(cat </dev/null timer_start - run_podman_silent_unless_verbose build --jobs $(get_number_of_cores_for_build) --tag "$(get_tag_for_build)" . || _abort_ "Container image build failed" + run_podman_silent_unless_verbose manifest rm "$(get_tag_for_build)" + run_podman_silent_unless_verbose manifest create "$(get_tag_for_build)" || _abort_ "Container image build failed" + run_podman_silent_unless_verbose build --jobs $(get_number_of_cores_for_build) --platform "${platforms}" --manifest "$(get_tag_for_build)" . || _abort_ "Container image build failed" timer_stop popd &>/dev/null } @@ -70,6 +74,7 @@ deploy_image() { local image_directory="$(get_image_directory_by_name "${container_image_name}")" pushd "${image_directory}" &>/dev/null || _abort_ "Switching to directory '${image_directory}' failed" run_podman_silent_unless_verbose push "$(get_tag_for_build)" || _abort_ "Pushing to registry failed" + run_podman_silent_unless_verbose manifest push "${container_image_name}:$(get_container_tag)" "docker://$(get_tag_for_build)" || _abort_ "Container image build failed" popd &>/dev/null }