correction variable
Cadoles/Jenkins/pipeline/head This commit looks good Details

This commit is contained in:
vfebvre 2022-06-03 15:18:47 +02:00
parent 60769e3c68
commit c0bc85f860
1 changed files with 8 additions and 8 deletions

View File

@ -7,7 +7,7 @@ def call() {
String credentials, String credentials,
String resourceEndpoint, String resourceEndpoint,
String resourceName, String resourceName,
String pulpHost = "" String pulpHost
) { ) {
def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/${resourceEndpoint}", httpMode: 'GET', ignoreSslErrors: true, validResponseCodes: "200" def response = httpRequest authentication: credentials, url: "https://${pulpHost}/pulp/api/v3/${resourceEndpoint}", httpMode: 'GET', ignoreSslErrors: true, validResponseCodes: "200"
def jsonResponse = readJSON text: response.content def jsonResponse = readJSON text: response.content
@ -21,7 +21,7 @@ def call() {
def waitForTaskCompletion( def waitForTaskCompletion(
String credentials, String credentials,
String taskHREF, String taskHREF,
String pulpHost = "" String pulpHost
) { ) {
def status = '' def status = ''
def created_resources = [] def created_resources = []
@ -42,7 +42,7 @@ def call() {
def exportPackages( def exportPackages(
String credentials, String credentials,
List packages = [], List packages = [],
String pulpHost = "" String pulpHost
) { ) {
def exportTasks = [] def exportTasks = []
packages.each { packages.each {
@ -56,7 +56,7 @@ def call() {
def createRepository( def createRepository(
String credentials, String credentials,
String name, String name,
String pulpHost = "" String pulpHost
) { ) {
def repositoryName = ["name": name] def repositoryName = ["name": name]
def postBody = JsonOutput.toJson(repositoryName) def postBody = JsonOutput.toJson(repositoryName)
@ -81,7 +81,7 @@ def call() {
String credentials, String credentials,
List packagesHREF, List packagesHREF,
String repositoryHREF, String repositoryHREF,
String pulpHost = "" String pulpHost
) { ) {
def packagesHREFURL = ["add_content_units": packagesHREF.collect { "https://$pulpHost$it" }] def packagesHREFURL = ["add_content_units": packagesHREF.collect { "https://$pulpHost$it" }]
def postBody = JsonOutput.toJson(packagesHREFURL) def postBody = JsonOutput.toJson(packagesHREFURL)
@ -94,7 +94,7 @@ def call() {
String credentials, String credentials,
String repositoryHREF, String repositoryHREF,
String signing_service = null, String signing_service = null,
String pulpHost = "" String pulpHost
) { ) {
def postContent = ["repository": repositoryHREF, "simple": true] def postContent = ["repository": repositoryHREF, "simple": true]
if (signing_service) { if (signing_service) {
@ -115,7 +115,7 @@ def call() {
String distributionName, String distributionName,
String basePath, String basePath,
String contentGuard = null, String contentGuard = null,
String pulpHost = "" String pulpHost
) { ) {
def httpMode = '' def httpMode = ''
def url = '' def url = ''
@ -148,7 +148,7 @@ def call() {
def getDistributionURL( def getDistributionURL(
String credentials, String credentials,
String resourceHREF, String resourceHREF,
String pulpHost = "" String pulpHost
) { ) {
def response = httpRequest authentication: credentials, url: "https://${pulpHost}${resourceHREF}", httpMode: 'GET', ignoreSslErrors: true, validResponseCodes: "200" def response = httpRequest authentication: credentials, url: "https://${pulpHost}${resourceHREF}", httpMode: 'GET', ignoreSslErrors: true, validResponseCodes: "200"
def jsonResponse = readJSON text: response.content def jsonResponse = readJSON text: response.content