Changement de serveur pulp
Some checks failed
Cadoles/Jenkins/pipeline/head There was a failure building this commit
Some checks failed
Cadoles/Jenkins/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f16e377911
commit
63c7b0b3a5
@ -3,7 +3,7 @@ import groovy.json.JsonOutput
|
||||
def exportPackages(
|
||||
String credentials,
|
||||
List packages = [],
|
||||
String pulpHost = 'pulp.bbohard.lan'
|
||||
String pulpHost = '192.168.30.3'
|
||||
) {
|
||||
def exportTasks = []
|
||||
packages.each {
|
||||
@ -18,7 +18,7 @@ def exportPackages(
|
||||
def getRepositoryHREF(
|
||||
String credentials,
|
||||
String repositoryLevel = 'dev',
|
||||
String pulpHost = 'pulp.bbohard.lan'
|
||||
String pulpHost = '192.168.30.3'
|
||||
) {
|
||||
def repositoriesMapping = ['dev': 'Cadoles4MSE']
|
||||
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/repositories/deb/apt/", httpMode: 'GET', ignoreSslErrors: true
|
||||
@ -33,7 +33,7 @@ def addToRepository(
|
||||
String credentials,
|
||||
List packagesHREF,
|
||||
String repositoryHREF,
|
||||
String pulpHost = 'pulp.bbohard.lan'
|
||||
String pulpHost = '192.168.30.3'
|
||||
) {
|
||||
def packagesHREFURL = ["add_content_units": packagesHREF.collect { "https://$pulpHost$it" }]
|
||||
def postBody = JsonOutput.toJson(packagesHREFURL)
|
||||
@ -45,7 +45,7 @@ def addToRepository(
|
||||
def publishRepository(
|
||||
String credentials,
|
||||
String repositoryHREF,
|
||||
String pulpHost = 'pulp.bbohard.lan'
|
||||
String pulpHost = '192.168.30.3'
|
||||
) {
|
||||
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
|
||||
@ -59,7 +59,7 @@ def distributePublication(
|
||||
String publicationHREF,
|
||||
String distributionName,
|
||||
String basePath,
|
||||
String pulpHost = 'pulp.bbohard.lan',
|
||||
String pulpHost = '192.168.30.3',
|
||||
String contentGuard = null
|
||||
) {
|
||||
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/distributions/deb/apt/", httpMode: 'GET', ignoreSslErrors: true
|
||||
@ -89,7 +89,7 @@ def distributePublication(
|
||||
def waitForTaskCompletion(
|
||||
String credentials,
|
||||
String taskHREF,
|
||||
String pulpHost = 'pulp.bbohard.lan'
|
||||
String pulpHost = '192.168.30.3'
|
||||
) {
|
||||
def status = ''
|
||||
def created_resources = []
|
||||
@ -108,7 +108,7 @@ def waitForTaskCompletion(
|
||||
def getDistributionURL(
|
||||
String credentials,
|
||||
String resourceHREF,
|
||||
String pulpHost = 'pulp.bbohard.lan'
|
||||
String pulpHost = '192.168.30.3'
|
||||
) {
|
||||
def response = httpRequest authentication: credentials, url: "https://${pulpHost}${resourceHREF}", httpMode: 'GET', ignoreSslErrors: true
|
||||
def jsonResponse = readJSON text: response.content
|
||||
|
Loading…
Reference in New Issue
Block a user