How to get svn version number from checkout for use in dsl

前端 未结 7 1858
南方客
南方客 2021-01-05 03:06

I created a pipeline job and would like to get the svn version number to enable further downstream processing in a call to a shell script. I am using a pipeline script simi

7条回答
  •  北海茫月
    2021-01-05 03:39

    I had the same issue, but you can solve it by using the map that is returned from calling SCM checkout. It contains a value for SVN_REVISION.

    // Get some code from a SVM repository
    def scmVars = checkout(
      ...
    )
    
    def svnversionnumber = scmVars.SVN_REVISION
    

提交回复
热议问题