Re: Declarative pipeline "when" tag is pushed

2018-01-03 Thread Lynn Lin
Steven Foster 于2017年12月21日 周四上午9:54写道: > I think you can get that with this: > > when { > expression { > env.TAG_NAME != null > } > } > Thanks,it works > > You get the env.TAG_NAME from the branch api when it's a tag build. > A shortcut would be

Re: Declarative pipeline "when" tag is pushed

2017-12-20 Thread Steven Foster
I think you can get that with this: when { expression { env.TAG_NAME != null } } You get the env.TAG_NAME from the branch api when it's a tag build. A shortcut would be helpful, I suggested it here https://issues.jenkins-ci.org/browse/JENKINS-48523 On Wednesday, December 20,

Declarative pipeline "when" tag is pushed

2017-12-19 Thread Lynn Lin
HI ,All, i followed with page https://wiki.jenkins.io/display/JENKINS/GitHub+Branch+Source+Plugin to enable tag will trigger a new build then the questions comes How can I use "when" in declarative pipeline to do something like deployment when a new tag is pushed to remote repository