You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
Our current deployment and automation process, triggered by terraform apply within GitHub Actions, utilizes a NetBox webhook to initiate a pipeline in AWX. This NetBox webhook sends a POST request to launch a specific AWX workflow job template.
The Current Problem:
Upon execution, the NetBox webhook currently does not capture or provide us with the ID of the launched AWX job (Job ID). This is a critical limitation because we need to track the execution status of this specific job in AWX (i.e., wait for its completion and retrieve the final status: success/failure) to determine the overall status of our GitHub Actions pipeline. Without this Job ID, we cannot programmatically query the AWX API to monitor the job's progress and ultimate outcome.
Our Goal:
We need to be able to retrieve the ID of the launched AWX job from the API response to the POST request sent by the NetBox webhook. This capability will enable us to:
Monitor Execution Status: Programmatically poll the AWX API using the known Job ID.
Manage Dependencies: Ensure that subsequent steps in our GitHub Actions workflow only proceed after the successful completion of the AWX pipeline.
Improve Logging and Debugging: Have a specific Job ID for quick access to logs and execution details within AWX.
Proposed Solution (for discussion):
Potential approaches to implement this functionality include:
Capturing the Full Response:
When the curl request is made to the AWX API within GitHub Actions (or if it's possible to modify the NetBox script that generates the curl command), the complete JSON response must be captured.
The id of the launched job can then be extracted from this JSON response using tools like jq.
Direct ID Transmission (Less Likely for NetBox):
If NetBox could somehow parse the AWX response and transmit the ID back to GitHub Actions (e.g., via output or a separate webhook), that would be ideal. However, this would likely require significant modifications to NetBox or an intermediate service.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
Our current deployment and automation process, triggered by terraform apply within GitHub Actions, utilizes a NetBox webhook to initiate a pipeline in AWX. This NetBox webhook sends a POST request to launch a specific AWX workflow job template.
The Current Problem:
Upon execution, the NetBox webhook currently does not capture or provide us with the ID of the launched AWX job (Job ID). This is a critical limitation because we need to track the execution status of this specific job in AWX (i.e., wait for its completion and retrieve the final status: success/failure) to determine the overall status of our GitHub Actions pipeline. Without this Job ID, we cannot programmatically query the AWX API to monitor the job's progress and ultimate outcome.
Our Goal:
We need to be able to retrieve the ID of the launched AWX job from the API response to the POST request sent by the NetBox webhook. This capability will enable us to:
Monitor Execution Status: Programmatically poll the AWX API using the known Job ID.
Manage Dependencies: Ensure that subsequent steps in our GitHub Actions workflow only proceed after the successful completion of the AWX pipeline.
Improve Logging and Debugging: Have a specific Job ID for quick access to logs and execution details within AWX.
Proposed Solution (for discussion):
Potential approaches to implement this functionality include:
Capturing the Full Response:
When the curl request is made to the AWX API within GitHub Actions (or if it's possible to modify the NetBox script that generates the curl command), the complete JSON response must be captured.
The id of the launched job can then be extracted from this JSON response using tools like jq.
Direct ID Transmission (Less Likely for NetBox):
If NetBox could somehow parse the AWX response and transmit the ID back to GitHub Actions (e.g., via output or a separate webhook), that would be ideal. However, this would likely require significant modifications to NetBox or an intermediate service.
Example AWX API Response containing the id:
JSON
{
"id": 1234,
"url": "https://awx.your-awx-instance.com/api/v2/jobs/1234/",
"type": "job",
"summary_fields": { /* ... */ },
"created": "...",
"modified": "...",
"name": "...",
"status": "pending",
// ... other fields
}
Beta Was this translation helpful? Give feedback.
All reactions