Pas de tâche pour la création de dépôt
Cadoles/Jenkins/pipeline/head There was a failure building this commit Details

This commit is contained in:
Benjamin Bohard 2022-02-09 19:39:15 +01:00
parent 5de4dfd4f8
commit ab34e49bc1
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ def createRepository(
def postBody = JsonOutput.toJson(repositoryName) def postBody = JsonOutput.toJson(repositoryName)
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/repositories/deb/apt/", httpMode: 'POST', requestBody: postBody, contentType: 'APPLICATION_JSON', ignoreSslErrors: true, validResponseCodes: "100:399" def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/repositories/deb/apt/", httpMode: 'POST', requestBody: postBody, contentType: 'APPLICATION_JSON', ignoreSslErrors: true, validResponseCodes: "100:399"
def jsonResponse = readJSON text: response.content def jsonResponse = readJSON text: response.content
return waitForTaskCompletion(credentials, jsonResponse.task) return jsonResponse.pulp_href
} }
def getRepositoryHREF( def getRepositoryHREF(
@ -44,7 +44,7 @@ def getRepositoryHREF(
if (repositoryHREF) { if (repositoryHREF) {
return repositoryHREF.pulp_href return repositoryHREF.pulp_href
} else { } else {
return createRepository(credentials, repositoriesMapping[repositoryLevel])[0] return createRepository(credentials, repositoriesMapping[repositoryLevel])
} }
} }