Nettoyage
Some checks failed
Cadoles/Jenkins/pipeline/head There was a failure building this commit

This commit is contained in:
2022-02-09 21:21:10 +01:00
parent b7c0f4e2ab
commit 331ba5fd6b
2 changed files with 2 additions and 7 deletions

View File

@ -7,11 +7,8 @@ def exportPackages(
) {
def exportTasks = []
packages.each {
println(it)
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/content/deb/packages/", httpMode: 'POST', ignoreSslErrors: true, multipartName: "file", timeout: 900, uploadFile: "${it}"
println(response)
def jsonResponse = readJSON text: response.content
println(jsonResponse)
exportTasks << jsonResponse['task']
}
return exportTasks
@ -40,7 +37,6 @@ def getRepositoryHREF(
'stable': 'Cadoles4MSE stable']
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/repositories/deb/apt/", httpMode: 'GET', ignoreSslErrors: true
def jsonResponse = readJSON text: response.content
println(jsonResponse)
def repositories = jsonResponse.results
def repositoryHREF = repositories.find { it -> it['name'] == repositoriesMapping[repositoryLevel] }
if (repositoryHREF) {
@ -71,7 +67,6 @@ def publishRepository(
def postBody = JsonOutput.toJson(["repository": repositoryHREF, "simple": true])
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/publications/deb/apt/", httpMode: 'POST', requestBody: postBody, contentType: 'APPLICATION_JSON', ignoreSslErrors: true
def jsonResponse = readJSON text: response.content
println(jsonResponse)
return waitForTaskCompletion(credentials, jsonResponse.task)
}