Release 1.1.5-jdk #557
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI on pull requests. | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths-ignore: | |
- 'docs/**' | |
env: | |
LANG: en_US.UTF-8 | |
S2I_URI: https://github.com/openshift/source-to-image/releases/download/v1.3.1/source-to-image-v1.3.1-a5a77147-linux-amd64.tar.gz | |
WILDFLY_S2I_BUILDER_IMAGE: wildfly/wildfly-s2i | |
WILDFLY_S2I_RUNTIME_IMAGE: wildfly/wildfly-runtime | |
# The image to copy in docker daemon for testing | |
UBUNTU_ARCHITECTURE_IMAGE: linuxamd64 | |
BEHAVE_TIMEOUT: 60 | |
jobs: | |
wfci: | |
name: Wildfly-s2i Build and Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
jdk: [jdk11, jdk17, jdk21] | |
steps: | |
- name: Update hosts - linux | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
cat /etc/hosts | |
sudo bash -c "echo '127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4' > /etc/hosts" | |
sudo bash -c "echo '::1 localhost localhost.localdomain localhost6 localhost6.localdomain6' >> /etc/hosts" | |
sudo sysctl -w fs.file-max=2097152 | |
- uses: actions/checkout@v2 | |
- uses: n1hility/cancel-previous-runs@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Verify latest ubi8-minimal | |
run: | | |
podman pull registry.access.redhat.com/ubi8/ubi-minimal | |
podman image ls | grep ubi8 | |
- name: Install qemu dependency | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y qemu-user-static | |
- name: Setup required system packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install krb5-multidev libkrb5-dev | |
- name: Setup Python 3.x | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11.5' | |
- name: Setup virtualenv and install cekit and required packages | |
run: | | |
python --version | |
sudo pip install virtualenv | |
mkdir ~/cekit | |
python3 -m venv ~/cekit | |
. ~/cekit/bin/activate | |
pip install cekit docker docker-squash odcs behave lxml packaging | |
- name: install s2i binary | |
run: | | |
echo ===== Installing s2i from ${{ env.S2I_URL }} ===== | |
mkdir /tmp/s2i/ && cd /tmp/s2i/ | |
wget ${{ env.S2I_URI }} | |
tar xvf source-to-image*.gz | |
sudo mv s2i /usr/bin | |
which s2i | |
s2i version | |
- name: Build DockerFiles | |
run: | | |
. ~/cekit/bin/activate | |
pushd wildfly-builder-image | |
WILDFLY_IMAGE_VERSION=$(yq e ".version" ${{ matrix.jdk }}-overrides.yaml) | |
cekit build --dry-run --overrides=${{ matrix.jdk }}-overrides.yaml docker | |
popd | |
pushd wildfly-runtime-image | |
cekit build --dry-run --overrides=${{ matrix.jdk }}-overrides.yaml docker | |
popd | |
echo "WILDFLY_IMAGE_VERSION=${WILDFLY_IMAGE_VERSION}" >> $GITHUB_ENV | |
- name: Buildah multi archs Builder Build | |
id: build_builder_image | |
uses: redhat-actions/[email protected] | |
with: | |
image: ${{ env.WILDFLY_S2I_BUILDER_IMAGE }} | |
tags: ${{ env.WILDFLY_IMAGE_VERSION }} | |
context: ./wildfly-builder-image/target/image | |
platforms: linux/amd64, linux/arm64 | |
containerfiles: | | |
./wildfly-builder-image/target/image/Dockerfile | |
- name: Buildah multi archs Runtime Build | |
id: build_runtime_image | |
uses: redhat-actions/[email protected] | |
with: | |
image: ${{ env.WILDFLY_S2I_RUNTIME_IMAGE }} | |
tags: ${{ env.WILDFLY_IMAGE_VERSION }} | |
context: ./wildfly-runtime-image/target/image | |
platforms: linux/amd64, linux/arm64 | |
containerfiles: | | |
./wildfly-runtime-image/target/image/Dockerfile | |
- name: Skopeo copy Builder and Runtime images to Docker local repo for tests | |
run: | | |
podman images | |
skopeo --debug copy containers-storage:localhost/${{ env.WILDFLY_S2I_BUILDER_IMAGE }}:${{ env.WILDFLY_IMAGE_VERSION }}-${{ env.UBUNTU_ARCHITECTURE_IMAGE }} docker-daemon:${{ env.WILDFLY_S2I_BUILDER_IMAGE }}:${{ env.WILDFLY_IMAGE_VERSION }} | |
skopeo --debug copy containers-storage:localhost/${{ env.WILDFLY_S2I_RUNTIME_IMAGE }}:${{ env.WILDFLY_IMAGE_VERSION }}-${{ env.UBUNTU_ARCHITECTURE_IMAGE }} docker-daemon:${{ env.WILDFLY_S2I_RUNTIME_IMAGE }}:${{ env.WILDFLY_IMAGE_VERSION }} | |
- name: List docker images | |
run: | | |
docker --version | |
docker info | |
docker image ls | |
docker inspect ${{ env.WILDFLY_S2I_BUILDER_IMAGE }}:${{ env.WILDFLY_IMAGE_VERSION }} | |
docker run --rm ${{ env.WILDFLY_S2I_BUILDER_IMAGE }}:${{ env.WILDFLY_IMAGE_VERSION }} bash | |
- name: Behave Tests JDK11, must remove tests that can't run on Java 11 | |
if: matrix.jdk == 'jdk11' | |
run: | | |
. ~/cekit/bin/activate | |
pushd wildfly-builder-image | |
rm -rf tests/features/no-jdk11-* | |
cekit test --image=${{ env.WILDFLY_S2I_BUILDER_IMAGE }}:${{ env.WILDFLY_IMAGE_VERSION }} behave | |
popd | |
- name: Behave Tests JDK | |
if: matrix.jdk != 'jdk11' | |
run: | | |
. ~/cekit/bin/activate | |
pushd wildfly-builder-image | |
cekit test --image=${{ env.WILDFLY_S2I_BUILDER_IMAGE }}:${{ env.WILDFLY_IMAGE_VERSION }} behave | |
popd | |
- name: Additional Tests | |
run: | | |
export IMAGE_VERSION=${{ env.WILDFLY_IMAGE_VERSION }} | |
export IMAGE_NAME=${{ env.WILDFLY_S2I_BUILDER_IMAGE }} | |
export RUNTIME_IMAGE_NAME=${{ env.WILDFLY_S2I_RUNTIME_IMAGE }} | |
. ~/cekit/bin/activate | |
./test/run | |
- name: Display resources information | |
if: failure() | |
run: | | |
echo === RUNNING CONTAINERS === | |
docker container ls | |
echo === RUNNING PROCESSES === | |
top -b -n1 | |
echo === DISK USAGE === | |
df -h |