Add collection setting toggle to UI

Additional API housekeeping, removing unused code

Treat default branch as no branch provided
This commit is contained in:
AlanCoding 2019-08-06 09:16:51 -04:00
parent 79a1dbc5a0
commit 2f3aafe1bb
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B
4 changed files with 8 additions and 3 deletions

View File

@ -399,6 +399,10 @@ class JobTemplate(UnifiedJobTemplate, JobOptions, SurveyJobTemplateMixin, Resour
# no-op case: Fields the same as template's value
# counted as neither accepted or ignored
continue
elif field_name == 'scm_branch' and old_value == '' and self.project and new_value == self.project.scm_branch:
# special case of "not provided" for branches
# job template does not provide branch, runs with default branch
continue
elif getattr(self, ask_field_name):
# Special case where prompts can be rejected based on project setting
if field_name == 'scm_branch':

View File

@ -702,8 +702,7 @@ class BaseTask(object):
abstract = True
proot_show_paths = []
def __init__(self, *args, **kwargs):
super(BaseTask, self).__init__(*args, **kwargs)
def __init__(self):
self.cleanup_paths = []
def update_model(self, pk, _attempt=0, **updates):

View File

@ -137,7 +137,6 @@
delegate_to: localhost
- block:
# TODO: don't run this if ansible verison doens't support collections
- name: detect collections/requirements.yml
stat: path={{project_path|quote}}/collections/requirements.yml
register: doesCollectionRequirementsExist

View File

@ -61,6 +61,9 @@ export default ['i18n', function(i18n) {
AWX_ROLES_ENABLED: {
type: 'toggleSwitch',
},
AWX_COLLECTIONS_ENABLED: {
type: 'toggleSwitch',
},
AWX_TASK_ENV: {
type: 'textarea',
reset: 'AWX_TASK_ENV',