Re: [EXTERNAL] - Re: how to reset build number

2017-06-09 Thread jerome
Just an idea, but if I understand you well, you may want to split the 
concept of Jenkins build number and the build number for you application. 
Maybe an SQLite db (or any other database type) where you could read/write 
with your main version, and make an incremental entry for the version build 
number and the related jenkins build number. This way you could keep a 
track of the matching version without altering the Jenkins behaviors and 
avoiding Jenkins build number clash.

Using either sh/bat and sqlite command line this should be easy to do. You 
can also put a cgi or wsgi  web page that could display/search into the db 
if needed. Keep the db on the master and access it with the master node and 
this should work.

My new thumb rules with pipeline, if you can do it outside of pipeline 
script itself it's way easier and robust to do so.

-- 
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/3275a328-0e19-4cfe-a8a8-1cac98710a52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [EXTERNAL] - Re: how to reset build number

2017-06-08 Thread Dirk Heinrichs
On 08.06.2017 14:55, Derrik Ammons wrote:

> But, Jenkins thinks the build is located in the last incremented build
> directory. For example, if the previous build was 5.0.5 (24), and the
> source code has 5.1.0, the iOS app has 5.1.0.1 but it's the link to
> the build artifacts points to build 25 folder, not 1.

This is absolutely correct. As I wrote: Version Number plugin uses its
own, completely independent counter. Jenkins' counter can't be altered.
However, the plugin allows you to assign its value to an environment
variable which you can then use throughout your job. We also use this
for example together with the Description Setter plugin to display the
value of this variable in the build history on the (left side of the)
job page.

HTH...

Dirk
-- 
*Dirk Heinrichs*
Senior Systems Engineer, Delivery Pipeline
OpenText^TM Discovery | Recommind
*Email*: dirk.heinri...@recommind.com 
*Website*: www.recommind.de 

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon
Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer
HRB 10646

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail sind nicht gestattet.

-- 
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/2ce4225c-dc25-236a-e3bd-9434c74ef7d1%40opentext.com.
For more options, visit https://groups.google.com/d/optout.


Re: [EXTERNAL] - Re: how to reset build number

2017-06-08 Thread Derrik Ammons
I actually have bot the Version Number Plugin and Next Build Number Plugin
and used them both before in jobs before Pipelines came around.

Now that I have a Jenkinsfile for the Mutibranch Pipeline, I am not sure how
to set the Version at build time for Jenkins.  I retrieve the Release Number
from source code (e.g 5.0.1) and want to reset the build number back to 1,
if it's a new release (e.g. 5.1.0 (1) for iOS and 5.1.0.1 for Android).

Both the iOS ipa and the Android apk gets the correct release version when
installing the app, opening the app, and checking the about dialog.  

But, Jenkins thinks the build is located in the last incremented build
directory.  For example, if the previous build was 5.0.5 (24), and the
source code has 5.1.0, the iOS app has 5.1.0.1 but it's the link to the
build artifacts points to build 25 folder, not 1.

It sounds like Daniel Becroft may have an idea... that I might need two
builds to take affect.  I may need to reset the build number and launch the
build again.  Will it reset the build number back to 1 even though I have 24
existing builds for 5.0.5 in my example above, or do I need to delete them? 



--
View this message in context: 
http://jenkins-ci.361315.n4.nabble.com/how-to-reset-build-number-tp1289785p4898934.html
Sent from the Jenkins users mailing list archive at Nabble.com.

-- 
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/1496926533125-4898934.post%40n4.nabble.com.
For more options, visit https://groups.google.com/d/optout.


Re: [EXTERNAL] - Re: how to reset build number

2017-06-08 Thread Dirk Heinrichs
On 08.06.2017 14:02, Richard Ginga wrote:

> The Next Build Number only lets you increment the build number. you
> can't set it back to anything because the build number is a very
> integral part of how Jenkins works. 

But the Version Number Plugin
 can.
It uses its own counter.

HTH...

Dirk
-- 
*Dirk Heinrichs*
Senior Systems Engineer, Delivery Pipeline
OpenText^TM Discovery | Recommind
*Email*: dirk.heinri...@recommind.com 
*Website*: www.recommind.de 

Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach

Vertretungsberechtigte Geschäftsführer John Marshall Doolittle, Gordon
Davies, Roger Illing, Registergericht Amtsgericht Bonn, Registernummer
HRB 10646

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser Mail sind nicht gestattet.

-- 
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/63a3e1c7-fbf6-53b9-206d-ba18f0a584b2%40opentext.com.
For more options, visit https://groups.google.com/d/optout.