[英]Some clarification needed on Jenkins code
def reportPath = build.getWorkspace().child("HealthTestResults.html")
msg.setContent(reportPath.readToString(), "text/html");
我知道getWorkspace(), child() , setContent()
是Java方法。 我了解他们的工作,我看了看Javadoc。 但是reportPath
是什么类型? 这里混合使用两种不同的语言吗?
为什么使用def
定义reportPath
?
这是Groovy的:
从这里: https : //wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin
脚本特别强大,因为它们提供了对Jenkins API的钩子,包括hudson.model.AbstractBuild和hudson.model.AbstractProject。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.