|
@@ -1,14 +1,12 @@
|
|
|
#!groovy
|
|
|
def GetLog(build_url) {
|
|
|
- def logurl = build_url + 'consoleText'
|
|
|
- def strip = logurl.replaceAll('http://','')
|
|
|
- def creds = "admin:QWEasd123"
|
|
|
- def auth = creds.bytes.encodeBase64().toString()
|
|
|
-
|
|
|
+ def strip = build_url.replaceAll('http://','')
|
|
|
withCredentials([string(credentialsId: 'JenkinsAPI', variable: 'token')]){
|
|
|
+ def creds = "admin:' + token
|
|
|
+ def auth = creds.bytes.encodeBase64().toString()
|
|
|
responce = httpRequest(contentType: 'APPLICATION_JSON',
|
|
|
httpMode: 'GET',
|
|
|
- url: 'http://' + strip,
|
|
|
+ url: 'http://' + strip + 'consoleText',
|
|
|
customHeaders:[[name:'Authorization', value:"Basic ${auth}"]])
|
|
|
return strip
|
|
|
}
|