我想了解詹金斯另一份工作的最新情况
Backup_Precheck
在我当前的管道脚本中。
下面是我的管道脚本。
import groovy.json.JsonSlurper
pipeline
{
agent any
stages {
stage('check Job Backup_Precheck status'){
steps {
script{
if(checkStatus() == "RUNNING" ){
timeout(time: 60, unit: 'MINUTES') {
waitUntil {
def status = checkStatus()
return (status == "SUCCESS" || status == "FAILURE" || status == "UNSTABLE" || status == "ABORTED")
}
}
}
if( checkStatus() != "SUCCESS" ){
error('Stopping Job Weekend_Backup becuase job Backup_Precheck is not successful.')
} else {
echo 'Triggering ansible backup automation'
} // script end
} //steps ends here
} // stage ends here
stage('Hello') {
steps { echo 'Hello World'}
}
} //step closes
}
def checkStatus() {
def statusUrl = httpRequest "https://portal.myshop.com:9043/job/Backup_Precheck/lastBuild/api/json"
def statusJson = new JsonSlurper().parseText(statusUrl.getContent())
return statusJson['result']
}
[Pipeline]{(Hello)阶段“Hello”已跳过,原因是以前的失败
[Pipeline]}[Pipeline]//阶段[Pipeline]}[Pipeline]//节点
[Pipeline]管道java的末尾。lang.NoSuchMethodError:没有这样的DSL
在步骤[ansiColor,ansiblePlaybook,
ansibleTower、ansibleTowerProjectRevision、ansibleTowerProjectSync、,
ansibleVault、存档、bat、生成、捕获错误、签出、删除目录、,
目录、dockerFingerprintFrom、dockerFingerprintRun、dockerNode、echo、,
库资源、加载、锁定、邮件、里程碑、节点、并行、,
powershell、属性、publishHTML、pwd、pwsh、readFile、readTrusted、,
ValidateClarativeEpiLine、Waitill、warnError、withContext、,
使用凭据,使用DockerConteta
我明白,我可能需要我安装HTTP请求插件,以解决上述问题。
HTTP Request Plugin
? 如果是这样,请引导我。