One more thing: You do not need to set all parameters on the new checkout. Get common parameters through the available scm variable. Getting the URL to git repository: final def repositories = scm.getRepositories() final def scmRepo = repositories.first() final def URI = scmRepo.getURIs().first().toString() Then set userRemoteConfigs: [[url: URI]]
torsdag 27. oktober 2016 09.18.40 UTC+2 skrev Sverre Moe følgende: > > Snippet generator => checkout: General SCM > > torsdag 27. oktober 2016 01.50.56 UTC+2 skrev Mario Rodriguez følgende: >> >> Hi, I have a very simple Jenkinsfile pipeline that uses "checkout scm" >> but I'm looking for a way to specify this command to use a different branch >> than master. >> >> any ideas ? >> >> thanks >> >> -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f8ed7c58-6422-424a-baea-6e32c0443770%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.