How can I set Jenkins build description while triggering build via curl?
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: $MyDescription
orecho 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
相关推荐
大象从不倒下 2020-07-31
AlisaClass 2020-07-19
淡风wisdon大大 2020-06-06
SoShellon 2013-06-01
chenshuixian 2013-06-01
羽化大刀Chrome 2013-05-31
LutosX 2013-07-29
ligaoyuan00 2013-03-31
swift 2013-03-26
quanhaoH 2013-06-17
周公周金桥 2020-09-06
zjuwangleicn 2020-09-04
hellowzm 2020-08-18
尚衍亮 2020-06-12
黎豆子 2020-05-07
hilary0 2020-05-04
zhanghao 2020-04-21
MaureenChen 2020-04-21