Ghassen Khalil ATI February 2016

Getting the current release version from Jenkins and pass it as a parameter

I am new to DevOps and Jenkins and I want to ask you something. I'll try to simply explain my need hoping for helpful suggestions from you, so here we start :

To Perform a Maven Release, I need to specify the version of the current release in my pom.xml file

<carbon.appmgt.version>${version.release}</carbon.appmgt.version>

To do so, I am using :

-Darguments='-Dversion.release=VALUE'

in Goals and Option input in Build section as this image shows

Now the problem is that I want Jenkins to put the current release version for me in the place of VALUE

Answers


nullpointer February 2016

Add a String Parameter to your jenkins job, say Value be that parameter you can use it as ${Value} wherever you want to in the job. I hope the image would clear on how to add a parameter to the job.

enter image description here

Post Status

Asked in February 2016
Viewed 1,830 times
Voted 9
Answered 1 times

Search




Leave an answer