I want to edit email body in pre-send script in Email-ext Jenkins plugin. What language should I use to write code? Bash script or other? Can you add some piece of code? Thanks.
相关问题
- JQ: Select when attribute value exists in a bash a
- Jenkins - cmd is not recognized
- bash print whole line after splitting line with if
- “command not found” errors in expect script execut
- grep using grep results
相关文章
- dotnet restore还原nuget包时无法加载 https://api.nuget.org/
- jenkins在window集群环境中如何部署自动化发布?
- jenkins + Publish over FTP 自动部署前端React项目
- jenkins自定打包部署React前端项目遇到的问题。
- Check if directory exists on remote machine with s
- Best way to manage docker containers with supervis
- Access BitBucket payload data in Jenkins pipeline
- Reverse four length of letters with sed in unix
The language you must use is Groovy, you can test your piece of code in the script console under Jenkins > Manage > script for anything that doesn't rely on build specific values.
Example that cancels sending the email if there have been no changes (tested when using Git):
Groovy is some sort of convenient scripting language that really uses Java behind the scenes, so you'll probably have to dig into the Jenkins java classes to see what is defined/what objects you can use. For instance the build variable in my sample code is really the java object FreeStyleBuild when I run it on my Jenkins job (which is a free style build job obviously).