Skip to content

Commit

Permalink
Build the Docker images for systemtest
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Donneaux <[email protected]>
  • Loading branch information
btlogy committed Nov 27, 2024
1 parent 533f5e9 commit 5aa05ff
Showing 1 changed file with 82 additions and 11 deletions.
93 changes: 82 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,28 +242,99 @@ jobs:
name: integration.eliot.json
path: integration.eliot.json

build-images:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
image:
- distro: "debian"
tag: "11"
python-version: "3.9"
- distro: "ubuntu"
tag: "20.04"
python-version: "3.9"
- distro: "ubuntu"
tag: "22.04"
python-version: "3.10"
- distro: "fedora"
tag: "35"
python-version: "3.10"
- distro: "oraclelinux"
tag: "8"
python-version: "3.9"
env:
TAG: ${{ matrix.image.tag }}
PYTHON_VERSION: ${{ matrix.image.python-version }}
DISTRO: ${{ matrix.image.distro }}
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Verify Docker
id: verify_docker
run: |
docker run --rm hello-world:latest > /dev/null
docker rmi hello-world:latest > /dev/null
docker version
- name: Cache docker images
uses: ScribeMD/[email protected]
with:
key: |
docker-${{ matrix.image.distro }}_${{ matrix.image.tag }}-py${{ matrix.image.python-version }}-${{ hashFiles(
format('docker/{0}/Dockerfile', matrix.image.distro)
) }}
- name: Build Docker image
id: build_image
run: |
docker images --filter "reference=*tahoelafsci/${DISTRO}"
docker images --filter "reference=*tahoelafsci/${DISTRO}:${TAG}-py${PYTHON_VERSION}" --quiet | grep -v "^$" \
|| docker \
build \
--build-arg TAG=${TAG} \
--build-arg PYTHON_VERSION=${PYTHON_VERSION} \
-t tahoelafsci/${DISTRO}:${TAG}-py${PYTHON_VERSION} \
-f ./docker/${DISTRO}/Dockerfile \
. \
&& docker images --filter "reference=*tahoelafsci/${DISTRO}"
systemtest:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
image:
- "debian:11"
- "ubuntu:20.04"
- "ubuntu:22.04"
- "fedora:35"
- "oraclelinux:8"
python-version:
- 3.9
- distro: "debian"
tag: "11"
python-version: "3.9"
- distro: "ubuntu"
tag: "20.04"
python-version: "3.9"
- distro: "ubuntu"
tag: "22.04"
python-version: "3.10"
- distro: "fedora"
tag: "35"
python-version: "3.10"
- distro: "oraclelinux"
tag: "8"
python-version: "3.9"
env:
TAG: ${{ matrix.image.tag }}
PYTHON_VERSION: ${{ matrix.image.python-version }}
DISTRO: ${{ matrix.image.distro }}
container:
image: ${{ matrix.image }}
image: ${{ matrix.image.distro }}
options: --cpus 1
env:
python-version: ${{ matrix.python-version }}
steps:
- name: Test image
run: |
echo "${{ matrix.image }}-${{ env.python-version }}"
echo "${DISTRO}:${TAG}-py${PYTHON_VERSION}"
packaging:
if: ${{ false }}
Expand Down

0 comments on commit 5aa05ff

Please sign in to comment.