• 大佬~
    def git_log = "git log".execute([], new File("you/job/path")).text 这一行是什么意思啊?我在 pipeline groovy 脚本中写了这些,报错了构建失败
    大概是下面这样
    node('master') {
    def git_log = "git log".execute([], new File("you/job/path")).text
    def m = git_log =~ /Author: (.) <(.)>\n/
    def author = m[0][2]
    try {
    }catch(err){
    }finally{
    if (currentBuild.result == 'FAILURE') {
    mail to: "${author}"
    }
    }
    }
    报错:org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new java.io.File java.lang.String