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
来自杭州西溪。主打Linux系统架构、维优、项目外包