-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parse job events to extract failure messages
Signed-off-by: Dasha Komsa <[email protected]>
- Loading branch information
1 parent
fbd8487
commit 29261a9
Showing
4 changed files
with
196 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package ansible | ||
|
||
// jobEvent represents [ansible-runner's job events](https://ansible.readthedocs.io/projects/runner/en/stable/intro/#artifactevents) | ||
type jobEvent struct { | ||
UUID string `json:"uuid"` | ||
Stdout string `json:"stdout"` | ||
|
||
// https://github.com/ansible/awx/blob/devel/docs/job_events.md#job-event-relationships | ||
// outlines various event types and the relationships between | ||
Event string `json:"event"` | ||
EventData map[string]any `json:"event_data"` | ||
} | ||
|
||
type runnerEventData struct { | ||
Play string `json:"play"` | ||
Task string `json:"task"` | ||
Host string `json:"host"` | ||
Result runnerResult `json:"res"` | ||
} | ||
|
||
type runnerResult struct { | ||
Msg string `json:"msg"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.