I have a job that needs to be triggered manually by a logged-in LDAP account. The job contains a step that syncs a git repo, in which the same LDAP account is used for git credentials.
Is it possible to get the credentialsId of the person who is currently logged in and is triggering a job? I'm imagining code like this:
def credential = getCurrentUserCredential() // ???
git credentialsId: credential, url: 'git.repo'