Passing scm tag values ​​via jenkins parameter

Can I pass scm parameter values ​​for Jenkins?

in my pom.xml, I have the default values:

<scm> <connection> scm:svn:https://172.10.10.30/svn/repPortal/branches/2012/Branch_A/ </ connection> <developerConnection>scm:svn:https://172.10.10.30/svn/repPortal/branches/2012/Branch_A/</developerConnection> </ scm> 

The problem is that I am starting another branch and I want to start the jenkins release (during the release process it generates a project tag), it will always get the value defined in pom.

I would pass the new path in a special parameter in Jenkins, which will be automatically installed in the scm pom project.

I did some tests by setting a string parameter in a parameterized building, but it did not recognize the given parameters and the design error.

Another way was to convey “goals and release options”:

 -X -Dresume=false release:clean release:prepare release:perform \ -DscmConnection="scm:svn:https://172.10.10.30/svn/repPortal/branches/2012/Branch_B"-DscmDeveloperConnection = "scm: svn: https :/ / 172.10.10.30/svn/repPortal/branches/2012/Branch_B "scm: validate 

The error is saved ...

 Caused by: org.apache.maven.shared.release.ReleaseFailureException: Missing required setting: scm connection or developerConnection must be specified. 

Is there a way to do this so that I can tell Jenkins?

+7
source share
2 answers

I noticed that the properties defined for SCM connections are incorrect. The property for establishing an SCM connection on the command line is -Dproject.scm.connection , and the developer connection -Dproject.scm.developerConnection .

+1
source

According to MRELEASE-707, the connection and developerConnection properties are read-only and cannot be set directly. You must define your own property for the URL and use it as a placeholder (see How to override the maven property on the command line? ).

+1
source

All Articles