Fixes issue #4 - Plugin is not working to launch workflow template jobs
The proposed code change provides the capability the capability to trigger a workflow template job on Ansible Tower.
This allows to run more complex automation job based on multiple templates.
There is no additional dependencies required for this change.
The synthetic.xml file has been modified to include a check box for "isTemplateWorkflow" described as "If job template is a workflow, tick this option."
This will provide a condition for a code perspective to use the appropriate tower_cli API construct.
Note that due to the nature of an Ansible Tower Workflow, the output of the actual play(s) will not be gathered as Ansible Tower will triggered multiple children jobs for each part of the Workflow elements.
This code change will not stdout the logs of all the children jobs to the Release run logs.
However, the code change will track the status of the Workflow job to ensure proper status is reported.
Type of change
Please delete options that are not relevant.
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update
How Has This Been Tested?
[ ] Provided Mock up setup
[x] Real deployment setup
Test Configuration:
Xebialabs XLRelease: 9.6.1
Ansible Tower: 3.6.2
Ansible: 2.9.1
This has been tested within a real deployment scenario with success.
See attached logs.
Checklist:
[x] My code follows the style guidelines of this project - ran through Codacy PR Quality Review
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
Description
Fixes issue #4 - Plugin is not working to launch workflow template jobs
The proposed code change provides the capability the capability to trigger a workflow template job on Ansible Tower. This allows to run more complex automation job based on multiple templates. There is no additional dependencies required for this change.
The synthetic.xml file has been modified to include a check box for "isTemplateWorkflow" described as "If job template is a workflow, tick this option."
This will provide a condition for a code perspective to use the appropriate tower_cli API construct.
Note that due to the nature of an Ansible Tower Workflow, the output of the actual play(s) will not be gathered as Ansible Tower will triggered multiple children jobs for each part of the Workflow elements. This code change will not stdout the logs of all the children jobs to the Release run logs. However, the code change will track the status of the Workflow job to ensure proper status is reported.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Test Configuration:
This has been tested within a real deployment scenario with success. See attached logs.
Checklist:
Template and Workflow tests.xlsx script_output_20200428004027.log script_output_20200428004044.log launchJobTemplate.json.txt launchJobWorkflowTemplate.json.txt