Repository: eclipse-bluechi/bluechi (language: python)

Issue:
Quay repo does not contain integration-test-base:latest arm image 
## Describe the bug

Running e2e tests is failing while running on arm machine 

## To Reproduce

Run e2e tests against arm HW 
or run the following script
podman build -f ./containers/$CONTAINER_USED -t $HIRTE_IMAGE_NAME .

## Expected behavior
podman build -f ./containers/$CONTAINER_USED -t $HIRTE_IMAGE_NAME .
shuld build image successfully 


Quay repo does not contain integration-test-base:latest arm image 
## Describe the bug

Running e2e tests is failing while running on arm machine 

## To Reproduce

Run e2e tests against arm HW 
or run the following script
podman build -f ./containers/$CONTAINER_USED -t $HIRTE_IMAGE_NAME .

## Expected behavior
podman build -f ./containers/$CONTAINER_USED -t $HIRTE_IMAGE_NAME .
shuld build image successfully 




Discussion / hints:
There are two issues here
1) inspect quay.io/hirte/integration-test-base:latest
Isnot multi arch
Need to add manifests arm64 and amd64
https://docs.podman.io/en/latest/markdown/podman-manifest.1.html

It is working on my personal repo 
https://quay.io/repository/yarboa/integration-test-base
Need to push it to hirte

~2) The fixes are not working while running on arm machines~
> Isnot multi arch

Yes, there is no manifest pushed to any of the repos in https://quay.io/organization/hirte/. Updating images is currently using the build triggers provided by quay. I am not sure if it is possible to add a manifest via this trigger. If not (what I think is most likely), we have to move from quay's build trigger to a gh action that builds and pushes the images as well as the manifest. Shouldn't be that much effort, I'll have a look at it. 

> Need to add manifests arm64 and amd64

Are there any other platforms we need to support? @Yarboa 
There are two issues here
1) inspect quay.io/hirte/integration-test-base:latest
Isnot multi arch
Need to add manifests arm64 and amd64
https://docs.podman.io/en/latest/markdown/podman-manifest.1.html

It is working on my personal repo 
https://quay.io/repository/yarboa/integration-test-base
Need to push it to hirte

~2) The fixes are not working while running on arm machines~
> Isnot multi arch

Yes, there is no manifest pushed to any of the repos in https://quay.io/organization/hirte/. Updating images is currently using the build triggers provided by quay. I am not sure if it is possible to add a manifest via this trigger. If not (what I think is most likely), we have to move from quay's build trigger to a gh action that builds and pushes the images as well as the manifest. Shouldn't be that much effort, I'll have a look at it. 

> Need to add manifests arm64 and amd64

Are there any other platforms we need to support? @Yarboa 

Fix patch:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 60f7afc67c..e99eaaa2c2 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -39,7 +39,7 @@ jobs:
     name: Common
     runs-on: ubuntu-latest
     container:
-      image: quay.io/hirte/build-base:latest
+      image: quay.io/bluechi/build-base:latest
 
     steps:
       - name: Checkout sources
@@ -63,7 +63,7 @@ jobs:
     name: C
     runs-on: ubuntu-latest
     container:
-      image: quay.io/hirte/build-base:latest
+      image: quay.io/bluechi/build-base:latest
 
     steps:
       - name: Checkout sources
@@ -108,7 +108,7 @@ jobs:
     name: Python
     runs-on: ubuntu-latest
     container:
-      image: quay.io/hirte/build-base:latest
+      image: quay.io/bluechi/build-base:latest
 
     steps:
       - name: Checkout sources
@@ -129,7 +129,7 @@ jobs:
     name: 
     runs-on: ubuntu-latest
     container:
-      image: quay.io/hirte/build-base:latest
+      image: quay.io/bluechi/build-base:latest
 
     steps:
       - name: Checkout sources
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 145401b4d7..8f7216cc39 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -9,7 +9,7 @@ jobs:
     name: Publish bluechi on PyPi
     runs-on: ubuntu-latest
     container:
-      image: quay.io/hirte/build-base:latest
+      image: quay.io/bluechi/build-base:latest
 
     steps:
       - name: Checkout sources
diff --git a/build-scripts/build-containers.sh b/build-scripts/build-containers.sh
new file mode 100644
index 0000000000..1e6559bf3e
--- /dev/null
+++ b/build-scripts/build-containers.sh
@@ -0,0 +1,26 @@
+#!/bin/bash -xe
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+SCRIPT_DIR=$( realpath "$0"  )
+SCRIPT_DIR=$(dirname "$SCRIPT_DIR")/
+CONTAINER_FILE_DIR=$SCRIPT_DIR"../tests/containers/"
+
+PLATFORMS=linux/amd64,linux/arm64
+
+function build_base(){
+    podman build --no-cache \
+        --platform ${PLATFORMS} \
+        -f ${CONTAINER_FILE_DIR}build-base \
+        --manifest quay.io/bluechi/build-base .
+}
+
+function integration_test_base(){
+    podman build --no-cache \
+        --platform ${PLATFORMS} \
+        -f ${CONTAINER_FILE_DIR}integration-test-base \
+        --manifest quay.io/bluechi/integration-test-base .
+}
+
+echo "Building containers and manifest for $1"
+echo ""
+$1


Test patch:
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 7902dd2668..5ec52e4111 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -11,7 +11,7 @@ jobs:
   rpmbuild:
     runs-on: ubuntu-latest
     container:
-      image: quay.io/hirte/build-base:latest
+      image: quay.io/bluechi/build-base:latest
     env:
       ARTIFACTS_DIR: exported-artifacts
     steps:
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index d4250051c7..3531f6edfc 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -11,7 +11,7 @@ jobs:
   test:
     runs-on: ubuntu-latest
     container:
-      image: quay.io/hirte/build-base:latest
+      image: quay.io/bluechi/build-base:latest
 
     steps:
       - name: Checkout sources
diff --git a/tests/README.md b/tests/README.md
index 937afb89af..0efd0f997a 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -132,4 +132,17 @@ The `integration-test-base` file describes the builder base image that is publis
 
 Both, `integration-test-local` as well as `integration-test-snapshot`, are based on the builder base image for the integration tests and contain compiled products and configurations for integration testing.
 
-**_NOTE:_** Currently, the images are pushed manually to the quay.io container repository. If any updates are required, please reach out to the [code owners](../.github/CODEOWNERS).
+### Updating container images in registry
+
+Currently, the base images are pushed manually to the [bluechi on quay.io](https://quay.io/organization/bluechi) organization and its repositories. If any updates are required, please reach out to the [code owners](../.github/CODEOWNERS).
+
+**Note to codeowners:**
+
+The base images [build-base](./containers/build-base) and [integration-test-base](./containers/integration-test-base) can be built for multiple platforms (arm64 and amd64) using the [build-containers.sh](../build-scripts/build-containers.sh) script. It'll build images for the given platforms as well as a manifest with the same name, which can then be pushed to the registry. From the root directory of the project run the following commands:
+
+```bash
+# building and publishing build-base image
+bash build-scripts/build-containers.sh build_base
+podman login -u="someuser" -p="topsecret" quay.io
+podman manifest push quay.io/bluechi/build-base:latest docker://quay.io/bluechi/build-base:latest
+```
diff --git a/tests/containers/build-base b/tests/containers/build-base
index 4437be9c99..03803a3c86 100644
--- a/tests/containers/build-base
+++ b/tests/containers/build-base
@@ -1,4 +1,4 @@
-FROM quay.io/centos/centos:stream9
+FROM --platform=$TARGETPLATFORM quay.io/centos/centos:stream9
 
 # CRB is required for meson
 # EPEL is required for lcov, python3-flake8, python3-html2text and codespell
diff --git a/tests/containers/integration-test-base b/tests/containers/integration-test-base
index 0c70d95a43..56b6f48e1d 100644
--- a/tests/containers/integration-test-base
+++ b/tests/containers/integration-test-base
@@ -1,4 +1,4 @@
-FROM quay.io/centos/centos:stream9
+FROM --platform=$TARGETPLATFORM quay.io/centos/centos:stream9
 
 RUN dnf upgrade --refresh -y --nodocs && \
     dnf install --nodocs \
diff --git a/tests/containers/integration-test-local b/tests/containers/integration-test-local
index 2e4c0dfcdf..913eb5bb02 100644
--- a/tests/containers/integration-test-local
+++ b/tests/containers/integration-test-local
@@ -1,4 +1,4 @@
-FROM quay.io/hirte/integration-test-base:latest
+FROM quay.io/bluechi/integration-test-base:latest
 
 RUN mkdir -p /tmp/bluechi-rpms
 COPY ./bluechi-rpms /tmp/bluechi-rpms
diff --git a/tests/containers/integration-test-snapshot b/tests/containers/integration-test-snapshot
index 74fd139e79..d16395c9c9 100644
--- a/tests/containers/integration-test-snapshot
+++ b/tests/containers/integration-test-snapshot
@@ -1,4 +1,4 @@
-FROM quay.io/hirte/integration-test-base:latest
+FROM quay.io/bluechi/integration-test-base:latest
 
 RUN dnf install -y --repo hirte-snapshot \
     --repofrompath hirte-snapshot,https://download.copr.fedorainfracloud.org/results/mperina/hirte-snapshot/centos-stream-9-$(uname -m)/ \