mirror of
https://github.com/ansible/awx.git
synced 2026-01-31 17:18:59 -03:30
Implement project pulling from Azure DevOps using Service Principals (#14628)
* Credential Lookup with multiple types Allow looking up a credential with one of multiple type IDs. * Allow Azure cred for SCM Allow selecting an Azure Resource Manager credential for Git-based SCMs. This is in order to enable using Azure Service Principals for project updates. * Implement Azure Service Principal Git This adds support for using an Azure Service Principal for project updates. --------- Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
committed by
GitHub
parent
727278aaa3
commit
2e2cd7f2de
@@ -50,7 +50,7 @@ class Project(HasCopy, HasCreate, HasNotifications, UnifiedJobTemplate):
|
||||
def create_payload(self, name='', description='', scm_type='git', scm_url='', scm_branch='', organization=Organization, credential=None, **kwargs):
|
||||
if credential:
|
||||
if isinstance(credential, Credential):
|
||||
if credential.ds.credential_type.namespace not in ('scm', 'insights'):
|
||||
if credential.ds.credential_type.namespace not in ('scm', 'insights', 'azure_rm'):
|
||||
credential = None # ignore incompatible credential from HasCreate dependency injection
|
||||
elif credential in (Credential,):
|
||||
credential = (Credential, dict(credential_type=(True, dict(kind='scm'))))
|
||||
|
||||
Reference in New Issue
Block a user