2016-11-28 212 views
0

我想添加一個標籤推到遠程存儲庫 所以我創建這樣推標籤與詹金斯工作DSL

job('example-2') { 
    scm { 
     git('ssh://[email protected]', 'branchName') 
    } 
    steps { 
     shell('sh XXXX') 
    } 
    publishers { 
     git { 
      pushOnlyIfSuccess() 
      tag('ssh://[email protected]', 'v1.6') { 
      message('Release v1.6') 
      create() 
      update() 
      } 
     } 
    } 
} 

作業的功能標籤(?,?)的參數是正確的? 這似乎不起作用。

回答

0

這是正確的喜歡這個

git { 
      remote { 
       name("abc") 
       url("ssh://[email protected]") 
      } 
      branch('branchName') 
     } 
tag("abc","v1.6") { 
......