{
def JSONURL = sh(script:'curl -u \$user:\$password \HTTPSJSONURL', returnStdout:true)
echo "$JSONURL"
if [[ \$response = *"\"status\":\"ERROR\""* ]]; then
exit 1
else
exit 0
fi
}
此代码将$ JSONURL值打印为空
输出应带有curl命令,应使用creds输入到vm并将HTTPSJSONURL分配给变量JSONURL。如果在json输出中发现错误,它将拒绝构建