xebialabs-community / xlr-ansible-tower-plugin

Launch Ansible Tower Jobs from XL Release
MIT License
1 stars 8 forks source link

Feature - Trigger Ansible workflow template #4 #7

Closed romdalf closed 3 years ago

romdalf commented 4 years ago

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

bmoussaud commented 3 years ago

thank you