diff --git a/vars/drafter.groovy b/vars/drafter.groovy index 55f161a..701b0f1 100644 --- a/vars/drafter.groovy +++ b/vars/drafter.groovy @@ -18,7 +18,7 @@ if (response.status == 202) { def job = readJSON(text: response.content) drafter.waitForJob( - "${baseUrl}${job['finished-job']}", + "${baseUrl}${job['finished-job']}" as String, credentials, job['restart-id'] as String) } else { error "Problem deleting draftset ${response.status} : ${response.content}" @@ -62,7 +62,7 @@ if (response.status == 202) { def job = readJSON(text: response.content) drafter.waitForJob( - "${baseUrl}${job['finished-job']}", + "${baseUrl}${job['finished-job']}" as String, credentials, job['restart-id'] as String) } else { error "Problem adding data ${response.status} : ${response.content}" @@ -77,7 +77,7 @@ if (response.status == 202) { def job = readJSON(text: response.content) drafter.waitForJob( - "${baseUrl}${job['finished-job']}", + "${baseUrl}${job['finished-job']}" as String, credentials, job['restart-id'] as String) } else { error "Problem publishing draftset ${response.status} : ${response.content}" diff --git a/vars/runPipeline.groovy b/vars/runPipeline.groovy index 33ef699..0abd20f 100644 --- a/vars/runPipeline.groovy +++ b/vars/runPipeline.groovy @@ -1,4 +1,4 @@ -def call(pipelineUrl, draftsetId, credentials, params) { +def call(String pipelineUrl, String draftsetId, String credentials, params) { withCredentials([usernameColonPassword(credentialsId: credentials, variable: 'USERPASS')]) { String boundary = UUID.randomUUID().toString() def allParams = [ @@ -25,7 +25,7 @@ if (importRequest.status == 202) { def importJob = readJSON(text: importRequest.content) String jobUrl = new java.net.URI(pipelineUrl).resolve(importJob['finished-job']) as String - drafter.waitForJob(jobUrl, credentials, importJob['restart-id']) + drafter.waitForJob(jobUrl, credentials, importJob['restart-id'] as String) } else { error "Failed import, ${importRequest.status} : ${importRequest.content}" }