0

I want to add a tag to push to a remote repository So I create a job like this

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

The function tag(?,?)'s parameter is right? It seems not work.

Jarod Ma
  • 21
  • 5

1 Answers1

0

It is right likes this

git {
          remote {
              name("abc")
              url("ssh://git@abc.git")
          }
          branch('branchName')
      }
tag("abc","v1.6") {
......
Jarod Ma
  • 21
  • 5