Shared GitHub Actions netdevsim CI for PTP operator repositories.
Operator trees (upstream monorepo, downstream OpenShift releases) call this
repo's reusable workflow at @main instead of copying scripts/run-on-vm.sh
and ptp-tools/ into each release branch.
Prow jobs and test/ stay in the operator repositories.
name: "ptp-operator: netdevsim CI"
on:
pull_request:
workflow_dispatch:
jobs:
netdevsim-ci:
uses: redhat-cne/ptp-netdevsim-ci/.github/workflows/netdevsim.yml@mainOptional inputs (defaults are the caller repository and SHA):
operator-repository—owner/nameoperator-ref— git ref or SHA
The workflow:
- Checks out this repository (
scripts/+ptp-tools/). - Checks out the operator PR (
sources+test/+config/). - Clones redhat-cne/netdevsim-dkms for DKMS modules.
- Runs
scripts/run-on-vm.shwithOPERATOR_ROOTpointing at the operator checkout.
| Path | Role |
|---|---|
.github/workflows/netdevsim.yml |
Reusable workflow_call |
scripts/ |
Kind/netdevsim helpers (run-on-vm.sh, run-tests.sh, ptp-vrt/, …) |
ptp-tools/ |
Test image Dockerfiles + Makefile (print-values) |
Image builds use OPERATOR_ROOT as the podman context so Dockerfiles COPY
pkg/linuxptp-daemon/, pkg/cloud-event-proxy/, bindata/, and
must-gather/ from the operator PR. Conformance tests run from
$OPERATOR_ROOT/test/conformance.
export OPERATOR_ROOT=/path/to/ptp-operator
sudo ./scripts/run-on-vm.sh --dkms "$VM_IP"When these scripts are overlaid into an operator checkout (see
fetch-upstream-ci.sh in the monorepo generator), OPERATOR_ROOT defaults to
that tree.