我正在嘗試為作業撰寫一個 groovy 腳本,以便有一個選擇引數。選擇之一是中間有空格的字串(即 'test env' )。有什么辦法可以實作嗎?
當前代碼引數 { choice(name: 'environment_name', description: 'The environment name',choices: 'test\ntest env') }
有什么辦法可以在 groovy 中實作這一點嗎?
uj5u.com熱心網友回復:
只需使用串列choices:
parameters {
choice(name: 'environment_name',
description: 'The environment name',
choices: ['test','test env'])
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/371287.html
