Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-platform support for execution environment #8951

Open
wants to merge 5 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/build-ee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,36 @@ jobs:

- uses: actions/setup-python@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y qemu binfmt-support

- name: Setup QEMU for multi-platform builds
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Cache Buildah layers
fridim marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/cache@v4
with:
path: /var/lib/containers/storage
key: ${{ runner.os }}-buildah-cache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildah-cache-

- name: Buildah Action
uses: redhat-actions/buildah-build@v2
id: build-image
with:
image: ee-multicloud
tags: ${{inputs.tag}} ${{ github.sha }}
labels: ${{ inputs.labels }}
platforms: linux/amd64,linux/arm64
context: tools/execution_environments/ee-multicloud-public
containerfiles: |-
tools/execution_environments/ee-multicloud-public/Containerfile
layers: true

- name: Push To quay.io
id: push-to-quay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,32 @@ set -ue

cd /tmp

# OC
# initArch discovers the architecture for this system.
ARCH=$(uname -m)
case $ARCH in
armv5*) ARCH="armv5";;
armv6*) ARCH="armv6";;
armv7*) ARCH="arm";;
aarch64) ARCH="arm64";;
x86) ARCH="386";;
x86_64) ARCH="amd64";;
i686) ARCH="386";;
i386) ARCH="386";;
esac

# OC
# Install rhel8 version of oc
# https://access.redhat.com/solutions/7077895
version=stable
arch=x86_64
tarball=openshift-client-linux.tar.gz
url="https://mirror.openshift.com/pub/openshift-v4/${arch}/clients/ocp/${version}/${tarball}"
tarball=openshift-client-linux-${ARCH}-rhel8.tar.gz
url="https://mirror.openshift.com/pub/openshift-v4/${ARCH}/clients/ocp/${version}/${tarball}"
curl -s -L "${url}" -o ${tarball}
tar xzf ${tarball}
install -t /usr/bin oc kubectl
rm ${tarball}

# Bitwarden

# DISCLAIMER: BW doesn't support ARM64 yet, so this is just a placeholder
url="https://vault.bitwarden.com/download/?app=cli&platform=linux"
curl -s -L "${url}" -o bw.zip
unzip bw.zip
Expand All @@ -24,9 +37,8 @@ rm bw bw.zip


# AWS CLI

aws_version=2.4.23
curl -s -L "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${aws_version}.zip" \
curl -s -L "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m)-${aws_version}.zip" \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't you be using $ARCH that you set earlier?

-o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
Expand Down
Loading