1. 程式人生 > >Jenkins中動態獲取git分支(下拉框)

Jenkins中動態獲取git分支(下拉框)

def gettags = ("git ls-remote -h https://ip:port/xxx/xxx.git").execute()gettags.text.readLines().collect { it.split()[1].replaceAll('refs/heads/', '') }.unique()