Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/spdk-common-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
freebsd_14=$(gh api --paginate "/repos/${{ github.repository }}/actions/artifacts?name=vm-image-freebsd_14_x86_64" -q '.artifacts |= sort_by(.updated_at)[-1] | .artifacts.workflow_run.id')
[[ -z "${fedora_43}" ]] && echo "fedora_43 is empty" && exit 1
[[ -z "${freebsd_14}" ]] && echo "freebsd_14 is empty" && exit 1
echo "artifact_id={'fedora_43':$fedora_43,'freebsd_14':$freebsd_14}" >> "$GITHUB_OUTPUT"
echo "artifact_id={\"fedora_43\":$fedora_43,\"freebsd_14\":$freebsd_14}" >> "$GITHUB_OUTPUT"
outputs:
artifact_id: ${{ steps.get_artifact_id.outputs.artifact_id }}

Expand Down Expand Up @@ -200,6 +200,7 @@ jobs:
CI_CFGS_REPOSITORY_PATH: ${{ github.workspace }}/ci/cijoe/configs/autorun_configs
NVME_SETUP: ${{ matrix.nvme_setup }}
DISTRO: ${{ matrix.distro }}
GITHUB_WORKSPACE: ${{ github.workspace }}

# TODO: Figure out how to pass volumes variable to container context
container:
Expand Down Expand Up @@ -273,7 +274,7 @@ jobs:
matrix.distro)) == ''
with:
name: vm-image-${{matrix.distro}}_x86_64
github-token: ${{ github.token }}
github-token: ${{ ! contains(github.actor, 'nektos/act') && github.token || '' }}
run-id: ${{ fromJson(needs.checkout_spdk.outputs.artifact_id)[ matrix.distro ] }}

- name: qemu-guest, initialize
Expand Down Expand Up @@ -311,7 +312,7 @@ jobs:
--monitor

- name: qemu-guest, shutdown
if: ${{ contains(matrix.workflow.name, 'vm') && contains(runner.labels, 'self-hosted') || env.ACT == 'true' }}
if: contains(matrix.workflow.name, 'vm') && contains(runner.labels,'self-hosted') && ! contains(github.actor, 'nektos/act')
run: |
cd ci/cijoe
cijoe workflows/autorun.yaml guest_shutdown \
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,17 @@ run a workflow using repository_dispatch event (example events provided in `.git
```

for more examples, visit <https://nektosact.com/>

Some of the workflow (like for example build_docker.yml or gerrit-false-positives-handler.yml) require the GitHub CLI to be installed,
which is not included in the default act containers (e.g. catthehacker/ubuntu:act-latest). To run these workflows and not encounter
"command not found" errors, you can use the Dockerfile in `act` directory:

```bash
docker build -t spdk-act ./act
```

and then use this image to replace the default act image during workflow execution:

```bash
gh act -P ubuntu-latest=spdk-act:latest --job build-docker --input distro=fedora_43
```
2 changes: 2 additions & 0 deletions act/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM catthehacker/ubuntu:act-latest
RUN apt-get update && apt-get install -y gh
3 changes: 1 addition & 2 deletions cijoe/configs/qemuhost-with-guest-fedora_43.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ cloud.url = "https://ftp.uni-stuttgart.de/fedora/releases/43/Cloud/x86_64/images
cloud.path = "{{ local.env.HOME }}/system_imaging/cloud/Fedora-Cloud-Base-Generic-43-1.6.x86_64.qcow2"
cloud.metadata_path = "{{ resources.auxiliary['system_imaging.cloudinit-linux-common-metadata'] }}"
cloud.userdata_path = "{{ resources.auxiliary['system_imaging.cloudinit-linux-common-userdata'] }}"
# disk.path = "{{ local.env.HOME }}/system_imaging/disk/fedora_43_x86_64.qcow2"
disk.path = "/__w/spdk-ci/spdk-ci/fedora_43_x86_64.qcow2"
disk.path = "{{ local.env.GITHUB_WORKSPACE }}/fedora_43_x86_64.qcow2"
docker.name = "spdk-ci"
docker.tag = "fedora_43"
3 changes: 1 addition & 2 deletions cijoe/configs/qemuhost-with-guest-freebsd_14.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ cloud.url = "https://object-storage.public.mtl1.vexxhost.net/swift/v1/1dbafeefbd
cloud.path = "{{ local.env.HOME }}/system_imaging/cloud/freebsd-14.2-zfs-2024-12-08.qcow2"
cloud.metadata_path = "{{ resources.auxiliary['system_imaging.cloudinit-freebsd-metadata'] }}"
cloud.userdata_path = "{{ resources.auxiliary['system_imaging.cloudinit-freebsd-userdata'] }}"
# disk.path = "{{ local.env.HOME }}/system_imaging/disk/freebsd_14_x86_64.qcow2"
disk.path = "/__w/spdk-ci/spdk-ci/freebsd_14_x86_64.qcow2"
disk.path = "{{ local.env.GITHUB_WORKSPACE }}/freebsd_14_x86_64.qcow2"
docker.name = "spdk-ci"
docker.tag = "freebsd_14"
2 changes: 1 addition & 1 deletion cijoe/workflows/build_fedora_qcow2_using_qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ steps:
- name: guest_update
run: |
dnf update -y
dnf install -y git perl-JSON-PP
dnf install -y git perl-JSON-PP nodejs
dnf autoremove -y
dnf clean all -y
Expand Down
2 changes: 1 addition & 1 deletion cijoe/workflows/build_freebsd_14_qcow2_using_qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ steps:
- name: guest_update
run: |
pkg install -y git
pkg install -y git nodejs
- name: kernel_src
run: |
Expand Down