Skip to content

Commit

Permalink
Build different versions of the testenv container
Browse files Browse the repository at this point in the history
  • Loading branch information
plars committed Nov 22, 2024
1 parent 99dcd99 commit 39adfd1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/build-testflinger-testenv-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ jobs:
contents: read
packages: write

strategy:
matrix:
base_version: [focal, jammy, noble]
base_image:
focal: ubuntu:focal
jammy: ubuntu:jammy
noble: ubuntu:noble

steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -43,6 +51,8 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.base_version }}
- name: Build and push backend Docker image
uses: docker/build-push-action@v6
Expand All @@ -51,3 +61,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BASE_IMAGE=${{ matrix.base_image }}
3 changes: 2 additions & 1 deletion agent/extra/testflinger-testenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:20.04
ARG BASE_IMAGE=ubuntu:20.04
FROM ${BASE_IMAGE}
ENV container docker
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common expect sudo openssh-client virtualenv curl wget build-essential python3-setuptools python3-dev python3-pip python3-requests python3-psutil git
RUN pip3 install PyYaml netifaces
Expand Down

0 comments on commit 39adfd1

Please sign in to comment.