Initial commit
Some checks failed
Multiarch build / Build multi-architecture image from scratch (push) Failing after 1m0s
Some checks failed
Multiarch build / Build multi-architecture image from scratch (push) Failing after 1m0s
Signed-off-by: Aleksander Cynarski <aleksander@cynarski.pl>
This commit is contained in:
parent
ec209d139d
commit
0cdb83445b
2
.gitea/install_latest_buildah.sh
Normal file
2
.gitea/install_latest_buildah.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
apt-get update -qq
|
||||||
|
apt-get -qq -y install buildah
|
65
.gitea/workflows/build.yml
Normal file
65
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
name: Multiarch build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *' # every day at midnight
|
||||||
|
|
||||||
|
env:
|
||||||
|
PROJECT_DIR: spring-petclinic
|
||||||
|
MVN_REPO_DIR: ~/.m2/repository
|
||||||
|
IMAGE_TAG: latest
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-multiarch-scratch:
|
||||||
|
name: Build multi-architecture image from scratch
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: testing-multiarch
|
||||||
|
DOCKER_DRIVER: overlay2
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
container:
|
||||||
|
options: --privileged --device /dev/fuse
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout Buildah action
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install latest buildah
|
||||||
|
run: |
|
||||||
|
bash ./.gitea/install_latest_buildah.sh
|
||||||
|
|
||||||
|
- name: Install qemu dependency
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y qemu-user-static
|
||||||
|
|
||||||
|
|
||||||
|
- name: Build Image
|
||||||
|
id: build_image_multiarch
|
||||||
|
uses: redhat-actions/buildah-build@v2
|
||||||
|
with:
|
||||||
|
image: ${{ env.IMAGE_NAME }}
|
||||||
|
tags: ${{ env.IMAGE_TAG }}
|
||||||
|
base-image: 'registry.access.redhat.com/ubi9-minimal:9.5'
|
||||||
|
archs: amd64, i386, ppc64le
|
||||||
|
containerfiles: |
|
||||||
|
./Containerfile
|
||||||
|
extra-args: |
|
||||||
|
--isolation=chroot
|
||||||
|
port: 8080
|
||||||
|
workdir: "."
|
||||||
|
|
||||||
|
- name: Echo Outputs
|
||||||
|
run: |
|
||||||
|
echo "Image: ${{ steps.build_image_multiarch.outputs.image }}"
|
||||||
|
echo "Tags: ${{ steps.build_image_multiarch.outputs.tags }}"
|
||||||
|
echo "Tagged Image: ${{ steps.build_image_multiarch.outputs.image-with-tag }}"
|
||||||
|
|
||||||
|
- name: Check images created
|
||||||
|
run: buildah images | grep '${{ env.IMAGE_NAME }}'
|
||||||
|
|
||||||
|
- name: Check manifest
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
buildah manifest inspect ${{ steps.build_image_multiarch.outputs.image }}:${{ env.IMAGE_TAG }}
|
5
Containerfile
Normal file
5
Containerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
FROM registry.access.redhat.com/ubi9-minimal:9.5
|
||||||
|
|
||||||
|
RUN yum install -y kubectl \
|
||||||
|
&& yum clean all \
|
||||||
|
&& rm -rf /var/cache/yum
|
Loading…
x
Reference in New Issue
Block a user