mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
AC-132 Minor updates after testing via API, notes on remaining items to implement.
This commit is contained in:
parent
ee3ba2c0e1
commit
e661f96054
@ -603,6 +603,15 @@ class Project(CommonModel):
|
||||
default=False,
|
||||
editable=False,
|
||||
)
|
||||
|
||||
# FIXME: Still need to implement:
|
||||
# - some scm_url validation
|
||||
# - scm_update_on_launch
|
||||
# - prompt for passwords for project update
|
||||
# - prompt for passwords when running job when scm_update_on_launch set
|
||||
# - prevent simultaneous updates of project and running jobs using project
|
||||
# - prevent manually setting local path when scm_type is set
|
||||
# - masking passwords in project update args/stdout
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
# Check if scm_type or scm_url changes.
|
||||
|
||||
@ -371,14 +371,10 @@ class RunProjectUpdate(BaseTask):
|
||||
args.append('project_update.yml')
|
||||
|
||||
ssh_key_path = kwargs.get('ssh_key_path', '')
|
||||
subcmds = [
|
||||
('ssh-add', '-D'),
|
||||
args,
|
||||
]
|
||||
if ssh_key_path:
|
||||
subcmds.insert(1, ('ssh-add', ssh_key_path))
|
||||
cmd = ' && '.join([subprocess.list2cmdline(x) for x in subcmds])
|
||||
args = ['ssh-agent', 'sh', '-c', cmd]
|
||||
subcmds = [('ssh-add', ssh_key_path), args]
|
||||
cmd = ' && '.join([subprocess.list2cmdline(x) for x in subcmds])
|
||||
args = ['ssh-agent', 'sh', '-c', cmd]
|
||||
return args
|
||||
|
||||
def build_cwd(self, project_update, **kwargs):
|
||||
|
||||
@ -37,7 +37,7 @@ project_urls = patterns('awx.main.views',
|
||||
url(r'^(?P<pk>[0-9]+)/organizations/$', 'project_organizations_list'),
|
||||
url(r'^(?P<pk>[0-9]+)/teams/$', 'project_teams_list'),
|
||||
url(r'^(?P<pk>[0-9]+)/update/$', 'project_update_view'),
|
||||
url(r'^(?P<pk>[0-9]+)/updates/$', 'project_updates_list'),
|
||||
url(r'^(?P<pk>[0-9]+)/project_updates/$', 'project_updates_list'),
|
||||
)
|
||||
|
||||
project_update_urls = patterns('awx.main.views',
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
- name: delete project directory before update
|
||||
file: path={{project_path}} state=absent
|
||||
when: scm_delete_on_update
|
||||
when: scm_delete_on_update|default('')
|
||||
|
||||
- name: update project using git
|
||||
git: dest={{project_path}} repo={{scm_url}} version={{scm_branch}} force={{scm_clean}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user