Launching jobs, monitoring, and interacting with workflows using CI/CD playbooks
Another use case for CI/CD is for launching jobs. Examples of this are scheduled jobs and integration tests. It is good practice to run workflows and jobs with test input and check the results. This can help detect changes that have happened in either the code or the environment.
The playbooks used in this section can be used as jobs in the Automation controller or in their respective Git service pipeline. The idea is to use the GitLab/GitHub workflows or a controller job in order to initiate them.
The playbook is a demonstration of what can be done.
The playbook takes several inputs as follows:
workflow_name
: Name of the workflow to launch and monitor.workflow_extra_vars_dict
: Dictionary of extra variables to use when launching the workflow.workflow_node_to_check
: Identifier of the workflow node to wait on till it is finished. The data from the API will be returned from this...