If you need to poll a job submitted to a multi-device agent through a GitHub
action rather than via the CLI, you can use the
poll-multi action in a CI workflow.
Assuming you've submitted a multi-device job with the submit
action, you can poll a job with the following step:
- name: Poll multi-device job
id: poll
uses: canonical/testflinger/.github/actions/poll-multi@main
with:
job-id: ${{ steps.submit.outputs.id }}Assuming you've submitted a multi-device job with the submit
action, you can poll a job until all child jobs reach a phase (sentinel-phase)
with the following step:
- name: Poll multi-device job until reservation
id: poll
uses: canonical/testflinger/.github/actions/poll-multi@main
with:
job-id: ${{ steps.submit.outputs.id }}
sentinel-phase: reserve
- name: Verify job statuses
shell: bash
env:
JOBS: ${{ steps.poll.outputs.jobs }}
run: |
echo $JOBS | jqRefer to the Outputs section for more information on the jobs
output of the action.
| Key | Description | Required | Default |
|---|---|---|---|
job-id |
Job ID of the parent multi-device job. | ✅ | |
sentinel-phase |
Phase that all child jobs must reach before this action terminates. | complete |
-
jobs: A JSON string containing an array of objects with machine IPs (machine-ip) and child job IDs (id).[ { "machine-ip": "string", "id": "uuid" } ]