|
@@ -1,7 +1,7 @@
|
|
|
#!groovy
|
|
|
def parse_log(){
|
|
|
script {
|
|
|
- sh(script: "sed '/ha/d' /tmp/fail.log > /tmp/new.log",returnStdout:true).trim()
|
|
|
+ sh(script: 'sed \'/ha/d\' /tmp/fail.log > /tmp/new.log',returnStdout:true).trim()
|
|
|
return readFile("/tmp/new.log")
|
|
|
}
|
|
|
}
|
|
@@ -9,8 +9,7 @@ def parse_log(){
|
|
|
def sendMessage(message){
|
|
|
def encode = URLEncoder.encode(message,"UTF-8")
|
|
|
withCredentials([string(credentialsId: 'TGBot', variable: 'SECRET')]) {
|
|
|
- responce = httpRequest(ConsoleLogResponceBody: true,
|
|
|
- contentType: 'APPLICATION_JSON',
|
|
|
+ responce = httpRequest(contentType: 'APPLICATION_JSON',
|
|
|
httpMode: 'GET',
|
|
|
url: "https://api.telegram.org/bot$SECRET/sendMessage?text=$encode&chat_id=-1001282104904&disable_web_page_preview=true",
|
|
|
validResponceCodes: '200')
|