我发现没有环境变量只能访问该名称。
使用名称时,GitHub中的环境分支名称使用Name where
origin
要么
remote
通常是在branchname。例如,如果GitHub分支名称是
mynewfeature
,Jenkins环境会将分支名称理解为
CustomName/mynewfeature
${GIT_BRANCH}
回报
CustomName/mynewfeature
允许在Jenkins的Execute Script操作中访问Name变量。