Jenkins Groovy post-build script to evaluate file with function

后端 未结 1 1086
执笔经年
执笔经年 2021-01-13 18:09

I\'m using the following code in post-build step of my Jenkins job:

evaluate(new File(\"Set-BuildBadge.groovy\"));

So it r

相关标签:
1条回答
  • 2021-01-13 18:41

    Looks like the JVM doesn't like class names with a hyphen in them.

    By calling your script Set-BuildBadge.groovy internally it is compiled into a class that isn't allowed when you add a function to the script.

    Changing the name of the script to SetBuildBadge.groovy will fix it :-)

    0 讨论(0)
提交回复
热议问题