def has_credentials_on_jenkins(jenkins_api, _uuid):
headers = {'Content-Type': 'application/json'}
path = 'credentials/store/system/domain/_/credential/%(uuid)s/api/json'
url = jenkins_api._build_url(path, {'uuid': _uuid})
request = Request(url, headers=headers)
try:
jenkins_api.jenkins_open(request)
return _uuid
except jenkins.NotFoundException:
return False
评论列表
文章目录