mirror of
https://github.com/ZwareBear/awx.git
synced 2026-03-20 07:43:35 -05:00
adding prompt-to-launch field on Labels field in Workflow Templates; with necessary UI and testing changes
Co-authored-by: Keith Grant <keithjgrant@gmail.com>
This commit is contained in:
committed by
Alan Rominger
parent
4e665ca77f
commit
663ef2cc64
@@ -47,6 +47,16 @@ options:
|
||||
description:
|
||||
- Variables which will be made available to jobs ran inside the workflow.
|
||||
type: dict
|
||||
job_tags:
|
||||
description:
|
||||
- Comma separated list of the tags to use for the job template.
|
||||
type: str
|
||||
ask_tags_on_launch:
|
||||
description:
|
||||
- Prompt user for job tags on launch.
|
||||
type: bool
|
||||
aliases:
|
||||
- ask_tags
|
||||
organization:
|
||||
description:
|
||||
- Organization the workflow job template exists in.
|
||||
@@ -85,6 +95,22 @@ options:
|
||||
description:
|
||||
- Prompt user for limit on launch of this workflow job template
|
||||
type: bool
|
||||
ask_labels_on_launch:
|
||||
description:
|
||||
- Prompt user for labels on launch.
|
||||
type: bool
|
||||
aliases:
|
||||
- ask_labels
|
||||
ask_skip_tags_on_launch:
|
||||
description:
|
||||
- Prompt user for job tags to skip on launch.
|
||||
type: bool
|
||||
aliases:
|
||||
- ask_skip_tags
|
||||
skip_tags:
|
||||
description:
|
||||
- Comma separated list of the tags to skip for the job template.
|
||||
type: str
|
||||
webhook_service:
|
||||
description:
|
||||
- Service that webhook requests will be accepted from
|
||||
@@ -665,11 +691,15 @@ def main():
|
||||
copy_from=dict(),
|
||||
description=dict(),
|
||||
extra_vars=dict(type='dict'),
|
||||
job_tags=dict(),
|
||||
skip_tags=dict(),
|
||||
organization=dict(),
|
||||
survey_spec=dict(type='dict', aliases=['survey']),
|
||||
survey_enabled=dict(type='bool'),
|
||||
allow_simultaneous=dict(type='bool'),
|
||||
ask_variables_on_launch=dict(type='bool'),
|
||||
ask_labels_on_launch=dict(type='bool', aliases=['ask_labels']),
|
||||
ask_skip_tags_on_launch=dict(type='bool', aliases=['ask_skip_tags']),
|
||||
inventory=dict(),
|
||||
limit=dict(),
|
||||
scm_branch=dict(),
|
||||
@@ -752,7 +782,11 @@ def main():
|
||||
'ask_scm_branch_on_launch',
|
||||
'ask_limit_on_launch',
|
||||
'ask_variables_on_launch',
|
||||
'ask_labels_on_launch',
|
||||
'ask_skip_tags_on_launch',
|
||||
'webhook_service',
|
||||
'job_tags',
|
||||
'skip_tags',
|
||||
):
|
||||
field_val = module.params.get(field_name)
|
||||
if field_val is not None:
|
||||
|
||||
@@ -18,6 +18,8 @@ def test_create_workflow_job_template(run_module, admin_user, organization, surv
|
||||
'survey_spec': survey_spec,
|
||||
'survey_enabled': True,
|
||||
'state': 'present',
|
||||
'job_tags': '',
|
||||
'skip_tags': '',
|
||||
},
|
||||
admin_user,
|
||||
)
|
||||
@@ -35,7 +37,16 @@ def test_create_workflow_job_template(run_module, admin_user, organization, surv
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_create_modify_no_survey(run_module, admin_user, organization, survey_spec):
|
||||
result = run_module('workflow_job_template', {'name': 'foo-workflow', 'organization': organization.name}, admin_user)
|
||||
result = run_module(
|
||||
'workflow_job_template',
|
||||
{
|
||||
'name': 'foo-workflow',
|
||||
'organization': organization.name,
|
||||
'job_tags': '',
|
||||
'skip_tags': '',
|
||||
},
|
||||
admin_user,
|
||||
)
|
||||
assert not result.get('failed', False), result.get('msg', result)
|
||||
assert result.get('changed', False), result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user