Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Trigger Ansible workflow template #4 #7

Merged
merged 6 commits into from
Dec 7, 2020

Conversation

romdalf
Copy link
Contributor

@romdalf romdalf commented Apr 27, 2020

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Provided Mock up setup
  • 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:

  • My code follows the style guidelines of this project - ran through Codacy PR Quality Review
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • 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

Template and Workflow tests.xlsx
script_output_20200428004027.log
script_output_20200428004044.log
launchJobTemplate.json.txt
launchJobWorkflowTemplate.json.txt

@romdalf romdalf changed the title Feature Ansible Workflow - Plugin is not working to launch workflow template jobs #4 Feature Ansible Workflow - issue #4 Apr 28, 2020
@romdalf romdalf changed the title Feature Ansible Workflow - issue #4 Feature - Trigger Ansible workflow template #4 Apr 28, 2020
@bmoussaud bmoussaud merged commit 88c1e45 into xebialabs-community:master Dec 7, 2020
@bmoussaud
Copy link

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants