jenkinsci / coding-webhook-plugin

Jenkins plugin for coding.net
https://plugins.jenkins.io/coding-webhook
GNU General Public License v3.0
60 stars 19 forks source link

env.BRANCH_NAME返回的是null #19

Open chanjarster opened 5 years ago

chanjarster commented 5 years ago

不确定这个问题是出在Coding plugin上还是Jenkins上,先描述一下问题吧:

弄了一个Simple Pipeline项目。

在Jenkinsfile里通过全局变量${env.BRANCH_NAME}得到的结果是null。

不过在这个界面是能够看到当前构建分支的:

qq20181217-151606 2x

因为我有这么一个要求,develop分支的打包推送到nexus仓库,其他分支不推送,如果无法知道当前是什么分支就没有办法达到这个要求了。