http://stackoverflow.com/questions/28503736/how-can-i-set-jenkins-build-description-while-triggering-build-via-curl
You can always have a variable and pass the build description into the variable on the initial invocation. Then at the end of your build, output the variable to console and catch with Description Setter plugin.
Edit to clarify:
- Install Description Setter plugin.
- In the Job Configuration, configure a String parameter, call it "MyDescription", leave defaults blank.
- Somewhere in the build steps, either "Execute Shell" or "Execute Windows Batch Command" type
echo Desc: $MyDescriptionorecho Desc: %MyDescription%, depending on your OS. - In the Post-Build steps, select "Set Build Description".
- Set Regular expression as
^Desc: (.*) - Set Description as
\1
- Set Regular expression as
- From command line trigger by:
curl -v -X POST --data-urlencode "MyDescription=This is my desc" "http://[myServer]/job/[jobName]/buildWithParameters"
For those interested in using the Jenkins UI, I'm trying:
- https://wiki.jenkins-ci.org/display/JENKINS/Build+Name+Setter+Plugin
- https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin
The Postbuild plugin is much more powerful, but requires Groovy tinkering and perms
本文介绍了一种通过使用DescriptionSetter插件及环境变量来设置Jenkins构建描述的方法,并提供了使用curl命令触发构建并传递描述的具体步骤。
2094

被折叠的 条评论
为什么被折叠?



