Re: How to auto increment a variable for every Jenkins Build

2019-01-24 Thread Justin Harringa
You can change nextBuildNumber but there are some implications there.
Sounds like you're not only looking for an incrementer but a semantic
version handler. You do get new build numbers with multi-branch. I could
see something like that working by using a branching strategy for each
semantic major.minor release where build number is the patch version.

On Thu, Jan 24, 2019 at 12:09 PM Faad Sayaou  wrote:

> The build number gets really large which is something we do not want.
> Would have been good if there was a way to reset it.
>
> On Thursday, 24 January 2019 21:01:39 UTC+1, Justin Harringa wrote:
>>
>> Any reason you couldn't use the BUILD_NUMBER environment variable for
>> this?
>>
>> On Thursday, January 24, 2019 at 10:12:30 AM UTC-8, Faad Sayaou wrote:
>>>
>>> Hello everyone,
>>>
>>> I would like to auto increment a number for every Jenkins build.  I have
>>> a function which reads value (1.0.0.0) from a file which goes as follows
>>>
>>>
>>> String IncBuildNum() {
>>>
>>> def v= getVersion("path/to/file.xml")
>>>
>>> def splitted= v..split('\\.')
>>> splitted[3]= (((splitted[3] +1 as BigDecimal) + 1 ) as String)
>>>
>>> return splitted.join('.')
>>> }
>>>
>>> However, I will like to increase this number 1 for every Jenkins build.
>>> Right now
>>> Is this possible?
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/LfbCVSYZIx8/unsubscribe.
> To unsubscribe from this group and all its topics, 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/8db59767-f91c-400e-a012-6a46db036261%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/8db59767-f91c-400e-a012-6a46db036261%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAOa798WfxzLy%3DPR99XAXQC%2BwyhiDA_wK2OTpeTHu%3D-ONwtxD%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to auto increment a variable for every Jenkins Build

2019-01-24 Thread Justin Harringa
Any reason you couldn't use the BUILD_NUMBER environment variable for this?

On Thursday, January 24, 2019 at 10:12:30 AM UTC-8, Faad Sayaou wrote:
>
> Hello everyone,
>
> I would like to auto increment a number for every Jenkins build.  I have a 
> function which reads value (1.0.0.0) from a file which goes as follows 
>
>
> String IncBuildNum() {
>
> def v= getVersion("path/to/file.xml")
>
> def splitted= v..split('\\.')
> splitted[3]= (((splitted[3] +1 as BigDecimal) + 1 ) as String)
>
> return splitted.join('.')
> }
>
> However, I will like to increase this number 1 for every Jenkins build. 
> Right now 
> Is this possible?
>

-- 
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/b97bdd9d-5238-4db3-abc4-2ef4bd984e36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: "Processing environment for ${pluginClassName}"

2019-01-24 Thread Justin Harringa
I'd like to eliminate these from console output as it's unnecessary noise. 
I really don't see the utility in these lines other than plugin debugging 
(which should probably be in Jenkins logs instead).

On Thursday, January 24, 2019 at 2:17:02 AM UTC-8, Robert Rajendra wrote:
>
> what do you want to accomplish?
>
>
>
>
> *Robert Rajendra*
>
> Associate Network/Server Support Engineer
>
> IT Hands
>
> P: +91 863.087.3094
>
> W: www.ITHands.com <http://www.ithands.com/>
>
>
> On Thu, 24 Jan 2019 at 01:33, Justin Harringa  > wrote:
>
>> I've been trying to figure out what is spitting out these lines in my 
>> console log for a bit. Anyone know off hand what is doing this? My 
>> google-foo on GitHub and on the web in general doesn't seem to be coming up 
>> with any good results.
>> Is this a plugin or Jenkins in general?
>>
>> Example:
>>
>> Processing environment for 
>> org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty
>> Processing environment for jenkins.model.BuildDiscarderProperty
>> Processing environment for 
>> org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty
>>
>>
>> Thanks all!
>>
>> Justin
>>
>> -- 
>> 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-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/CAOa798Vs-SVD4LqAgK92stFd-kycjgzVMkYx_rb-uojfX1R_-A%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAOa798Vs-SVD4LqAgK92stFd-kycjgzVMkYx_rb-uojfX1R_-A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/d21b6599-9e22-418c-a6fa-7badddaa218b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


"Processing environment for ${pluginClassName}"

2019-01-24 Thread Justin Harringa
I've been trying to figure out what is spitting out these lines in my
console log for a bit. Anyone know off hand what is doing this? My
google-foo on GitHub and on the web in general doesn't seem to be
coming up with any good results.
Is this a plugin or Jenkins in general?

Example:

Processing environment for
org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty
Processing environment for jenkins.model.BuildDiscarderProperty
Processing environment for
org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty


Thanks all!

Justin

-- 
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/CAOa798Vs-SVD4LqAgK92stFd-kycjgzVMkYx_rb-uojfX1R_-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.