Correction du code de retour d’une requête POST
Cadoles/Jenkins/pipeline/head There was a failure building this commit Details

This commit is contained in:
Benjamin Bohard 2022-03-29 09:54:05 +02:00
parent 97abfb0ade
commit 71f5fbfe78
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ def createRepository(
) {
def repositoryName = ["name": name]
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: "202"
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/repositories/deb/apt/", httpMode: 'POST', requestBody: postBody, contentType: 'APPLICATION_JSON', ignoreSslErrors: true, validResponseCodes: "201"
def jsonResponse = readJSON text: response.content
return jsonResponse.pulp_href