Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我打印 env.BRANCH_NAME 它打印 PR-pullrequestnumber 时,我正在使用 Jenkins 多分支管道拉取请求功能。而不是我想获得分支名称我怎么能得到它?
env.CHANGE_BRANCH如果有拉取请求,我可以从中获取分支名称。
env.CHANGE_BRANCH
合并代码后,您将获得确切的分支名称。只是有所不同