|
@@ -1,8 +1,9 @@
|
|
#!groovy
|
|
#!groovy
|
|
-def GetLog() {
|
|
|
|
|
|
+def GetLog(url) {
|
|
|
|
+ def encode = URLEncoder.encode(url,"UTF-8")
|
|
withCredentials([string(credentialsId: 'JenkinsAPI', variable: 'TOKEN')]){
|
|
withCredentials([string(credentialsId: 'JenkinsAPI', variable: 'TOKEN')]){
|
|
responce = httpRequest(httpMode: 'GET',
|
|
responce = httpRequest(httpMode: 'GET',
|
|
- url: 'http://admin:$TOKEN@192.168.10.14:8080',
|
|
|
|
|
|
+ url: 'http://admin:$TOKEN@192.168.10.14:8080/$url',
|
|
validResponces: '200')
|
|
validResponces: '200')
|
|
return responce
|
|
return responce
|
|
}
|
|
}
|
|
@@ -37,7 +38,7 @@ pipeline {
|
|
}
|
|
}
|
|
failure {
|
|
failure {
|
|
echo 'I failed :((('
|
|
echo 'I failed :((('
|
|
- echo GetLog()
|
|
|
|
|
|
+ echo GetLog("${BUILD_URL}"/consoleText)
|
|
}
|
|
}
|
|
changed {
|
|
changed {
|
|
echo 'things were different before...'
|
|
echo 'things were different before...'
|