test déclaration des paramètres de manière globale
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
c0bc85f860
commit
5112fc5d88
@ -3,13 +3,20 @@ import groovy.json.JsonOutput
|
||||
def call() {
|
||||
pipeline {
|
||||
|
||||
parameters {
|
||||
string(
|
||||
name: 'pulpHost',
|
||||
description: 'Nom de domaine pour le serveur Pulp',
|
||||
defaultValue: ''
|
||||
}
|
||||
|
||||
def getResourceHREF(
|
||||
String credentials,
|
||||
String resourceEndpoint,
|
||||
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://${params.pulpHost}/pulp/api/v3/${resourceEndpoint}", httpMode: 'GET', ignoreSslErrors: true, validResponseCodes: "200"
|
||||
def jsonResponse = readJSON text: response.content
|
||||
def resource = jsonResponse.results.find { it -> it.name == resourceName}
|
||||
if (resource) {
|
||||
|
Loading…
Reference in New Issue
Block a user