Skip to content

Commit

Permalink
ci: Cover more container posibilities
Browse files Browse the repository at this point in the history
Add more conditions to the image prepare process.
This allows us to test the prebuilt images for both
Fedora and Ubuntu.

Run the weekly image on main branch with the
use of Fedora for the weekly runs.

Reported-at: https://issues.redhat.com/browse/FDP-149
Signed-off-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
  • Loading branch information
almusil authored and dceara committed Jan 9, 2024
1 parent 910efaf commit 23e82a7
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ jobs:
run: ./.ci/dpdk-build.sh

prepare-container:
# This job has the following matrix, x: Job trigger, y: Branch
# (scheduled jobs run only on main):
# +-------+-------------------+-------------------+
# | | Push/Pull request | Scheduled |
# +-------+-------------------+-------------------+
# | main | ghcr.io - Ubuntu | ghcr.io - Fedora |
# +-------+-------------------+-------------------+
# | !main | Builds - Ubuntu | xxxxxxxxxxxxxxxxx |
# +-------+-------------------+-------------------+
env:
DEPENDENCIES: podman
name: Prepare container
Expand All @@ -95,10 +104,25 @@ jobs:
- name: Install dependencies
run: sudo apt install -y ${{ env.DEPENDENCIES }}

- name: Choose image distro
if: github.event_name == 'push' || github.event_name == 'pull_request'
run: |
echo "IMAGE_DISTRO=ubuntu" >> $GITHUB_ENV
- name: Choose image distro
if: github.event_name == 'schedule'
run: |
echo "IMAGE_DISTRO=fedora" >> $GITHUB_ENV
- name: Build container
run: make ubuntu
if: github.ref_name != 'main'
run: make ${{ env.IMAGE_DISTRO }}
working-directory: utilities/containers

- name: Download container
if: github.ref_name == 'main'
run: podman pull ghcr.io/ovn-org/ovn-tests:${{ env.IMAGE_DISTRO }}

- name: Export image
run: podman save -o /tmp/image.tar ovn-org/ovn-tests

Expand Down

0 comments on commit 23e82a7

Please sign in to comment.