Skip to content

Commit

Permalink
ci: numacell: fix dockerfile, add release flow
Browse files Browse the repository at this point in the history
Fix the dockerfile to be self-contained (use builder step)
and add gh action release flow to make updating the CI image
easier.

Signed-off-by: Francesco Romani <[email protected]>
  • Loading branch information
ffromani committed Jan 24, 2025
1 parent 192c636 commit c3251be
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/release-numacell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI testsuite release flow

on:
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
release-build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v5
with:
fetch-depth: 0

# note the version is hardcoded here because
# we expect to refresh from main branch
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: numacell-device-plugin
tags: test-ci
dockerfiles: |
./Dockerfile.tests
- name: Push to quay
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/openshift-kni
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_ROBOTOKEN }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
9 changes: 8 additions & 1 deletion test/deviceplugin/cmd/numacell/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
FROM docker.io/golang:1.23 AS builder

WORKDIR /go/src/github.com/openshift-kni/numaresources-operator
COPY . .

RUN make build-numacell

FROM registry.access.redhat.com/ubi9/ubi-minimal
ADD numacell /bin/numacell
COPY --from=builder /go/src/github.com/openshift-kni/numaresources-operator/bin/numacell /bin/numacell
ENTRYPOINT ["/bin/numacell", "-alsologtostderr", "-v", "3"]

0 comments on commit c3251be

Please sign in to comment.