fix: build the JOB URL on the server side #948
Merged
+197
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the advent of controller behind our server the URL to access the job details for JobTemplate and WorkflowTemplate has changed
We have an api end point that is specificed in the RH AAP Credential Type this is sent to the ansible-rulebook so that it can talk to the controller via the api. This end point could point to a controller directly or to a controller behind our server.
To directly access the controller we only need the host and port so the API end point would look like
e.g. https://<<your_controller>>/
This will map the Job URL for a Job Template to look like
https://<<your_controller>>/#/jobs/playbook/23/details/
This will map the Job URL for a Workflow Template to look like
https://<<your_controller>>/#/jobs/workflow/24/details/
When the controller is behind our server the API end point is e.g. https://<<your_server>>/api/controller
This will map the Job URL for a Job Template to look like
https://<<your_server>>/execution/jobs/playbook/25/details/
This will map the Job URL for a Workflow Template to look like
https://<<your_server>>/execution/jobs/workflow/26/details/
For this to work correctly we need ansible-rulebook to pass in the controller_job_id and the action_type. Currently it doesn't send up the controller_job_id which is being fixed in a separate PR.
https://issues.redhat.com/browse/AAP-25604