Skip to content

Commit

Permalink
ci/container.yml: build also vdsm-test containers
Browse files Browse the repository at this point in the history
Build also vdsm test containers in the weekly
build workflow.

Add another job to the containers workflow
to build and upload test containers
in `docker` directory.

For test containers, build each distro
separately and push it to the same
repository with a different tag.

Final tree of Vdsm repositories:
.
└── ovirt/
    ├── ovirt-vdsm-network-tests-functional:
    │   ├── centos-8
    │   ├── centos-9
    │   └── alma-9
    ├── ovirt-vdsm-network-tests-integration:
    │   ├── centos-8
    │   ├── centos-9
    │   └── alma-9
    ├── ovirt-vdsm-network-tests-unit:
    │   ├── centos-8
    │   ├── centos-9
    │   └── alma-9
    └── ovirt-test:
        ├── centos-8
        ├── centos-9
        └── alma-9

Signed-off-by: Albert Esteve <aesteve@redhat.com>
  • Loading branch information
aesteve-rh committed Dec 13, 2022
1 parent b0f8e9e commit 848280c
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,61 @@ env:
IMAGE_REGISTRY: quay.io
can_push: ${{ github.repository_owner == 'oVirt' }}
jobs:
container:
container-network:
runs-on: ubuntu-latest
strategy:
matrix:
container: [ functional, integration, unit ]
distro: [ centos-8, centos-9, alma-9 ]
include:
- directory: docker/network
prefix: ovirt/vdsm-network-tests
container: [ functional, integration, unit ]
- directory: docker
prefix: ovirt/vdsm
container: [ test ]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install podman
- name: Build container images
working-directory: docker/network
run: make ${{ matrix.container }}
working-directory: ${{ matrix.directory }}
run: make ${{ matrix.distro }}
- name: Push to Quay.io
if: ${{ env.can_push == 'true' }}
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ovirt/vdsm-network-tests-${{ matrix.container }}
tags: alma-9 centos-8 centos-9
image: ${{ matrix.prefix }}-${{ matrix.container }}
tags: ${{ matrix.distro }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Print image url
if: ${{ env.can_push == 'true' }}
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
container-test:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [ centos-8, centos-9, alma-9 ]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt update
sudo apt install podman
- name: Build container images
working-directory: docker
run: make ${{ matrix.distro }}
- name: Push to Quay.io
if: ${{ env.can_push == 'true' }}
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ovirt/vdsm-test
tags: ${{ matrix.distro }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
Expand Down

0 comments on commit 848280c

Please sign in to comment.