Jenkins Pipeline

def resp = httpRequest acceptType: 'APPLICATION_JSON', consoleLogResponseBody: true, timeout: 60, contentType: 'APPLICATION_JSON', httpMode: 'POST', requestBody: email_content, url: url, validResponseCodes: '200'
 
import groovy.json.JsonOutput
def email_json = readJSON text: '{}'
email_json['requestedBy'] = "nobody"
def email_content = JsonOutput.toJson(email_json)
 
dir(".\test"){
  deleteDir()
}
 
error("abort the build now")
fileExists
fileOperations
fineFiles
load:  load groovy file
lock: lock share rescource
logstash
properties: set job properties
publishHTML
readProperties
retry
sleep
stash
timeout
touch
unzip
waitUntil
writeFile
writeJSON
createSummary("graph.gif").appendText("<table></table>")
catchError
zip
ws
 
posted @ 2020-12-25 17:25  tinaleft  阅读(92)  评论(0编辑  收藏  举报