ajout groovy pour pulp.cadoles.com
Cadoles/Jenkins/pipeline/head There was a failure building this commit
Details
Cadoles/Jenkins/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
71f5fbfe78
commit
0314146633
|
@ -4,7 +4,7 @@ def getResourceHREF(
|
|||
String credentials,
|
||||
String resourceEndpoint,
|
||||
String resourceName,
|
||||
String pulpHost = '192.168.30.3'
|
||||
String pulpHost = 'pulp.cadoles.com'
|
||||
) {
|
||||
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/${resourceEndpoint}", httpMode: 'GET', ignoreSslErrors: true, validResponseCodes: "200"
|
||||
def jsonResponse = readJSON text: response.content
|
||||
|
@ -18,7 +18,7 @@ def getResourceHREF(
|
|||
def waitForTaskCompletion(
|
||||
String credentials,
|
||||
String taskHREF,
|
||||
String pulpHost = '192.168.30.3'
|
||||
String pulpHost = 'pulp.cadoles.com'
|
||||
) {
|
||||
def status = ''
|
||||
def created_resources = []
|
||||
|
@ -39,10 +39,10 @@ def waitForTaskCompletion(
|
|||
def exportPackages(
|
||||
String credentials,
|
||||
List packages = [],
|
||||
String pulpHost = '192.168.30.3'
|
||||
String pulpHost = 'pulp.cadoles.com'
|
||||
) {
|
||||
def exportTasks = []
|
||||
packages.each {
|
||||
packages.each {
|
||||
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/content/deb/packages/", httpMode: 'POST', ignoreSslErrors: true, multipartName: "file", timeout: 900, uploadFile: "${it}", validResponseCodes: "202"
|
||||
def jsonResponse = readJSON text: response.content
|
||||
exportTasks << jsonResponse['task']
|
||||
|
@ -53,7 +53,7 @@ def exportPackages(
|
|||
def createRepository(
|
||||
String credentials,
|
||||
String name,
|
||||
String pulpHost = '192.168.30.3'
|
||||
String pulpHost = 'pulp.cadoles.com'
|
||||
) {
|
||||
def repositoryName = ["name": name]
|
||||
def postBody = JsonOutput.toJson(repositoryName)
|
||||
|
@ -78,7 +78,7 @@ def addToRepository(
|
|||
String credentials,
|
||||
List packagesHREF,
|
||||
String repositoryHREF,
|
||||
String pulpHost = '192.168.30.3'
|
||||
String pulpHost = 'pulp.cadoles.com'
|
||||
) {
|
||||
def packagesHREFURL = ["add_content_units": packagesHREF.collect { "https://$pulpHost$it" }]
|
||||
def postBody = JsonOutput.toJson(packagesHREFURL)
|
||||
|
@ -91,7 +91,7 @@ def publishRepository(
|
|||
String credentials,
|
||||
String repositoryHREF,
|
||||
String signing_service = null,
|
||||
String pulpHost = '192.168.30.3'
|
||||
String pulpHost = 'pulp.cadoles.com'
|
||||
) {
|
||||
def postContent = ["repository": repositoryHREF, "simple": true]
|
||||
if (signing_service) {
|
||||
|
@ -112,7 +112,7 @@ def distributePublication(
|
|||
String distributionName,
|
||||
String basePath,
|
||||
String contentGuard = null,
|
||||
String pulpHost = '192.168.30.3'
|
||||
String pulpHost = 'pulp.cadoles.com'
|
||||
) {
|
||||
def httpMode = ''
|
||||
def url = ''
|
||||
|
@ -145,7 +145,7 @@ def distributePublication(
|
|||
def getDistributionURL(
|
||||
String credentials,
|
||||
String resourceHREF,
|
||||
String pulpHost = '192.168.30.3'
|
||||
String pulpHost = 'pulp.cadoles.com'
|
||||
) {
|
||||
def response = httpRequest authentication: credentials, url: "https://${pulpHost}${resourceHREF}", httpMode: 'GET', ignoreSslErrors: true, validResponseCodes: "200"
|
||||
def jsonResponse = readJSON text: response.content
|
||||
|
|
Loading…
Reference in New Issue