Build numbers are really important to Jenkins so you can't just set them. Through the Set Next Build Number plugin you can set a "larger" build number than the current one but you cannot set a smaller one. there are ways of setting the "display name" of a build to anything. See the version number plugin or the build setter plugin. The EnvInject plugin does exactly what it says. After executing one of these steps, there will be environment variables setup for any remaining steps.
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of pdo2011 Sent: Wednesday, March 25, 2015 2:13 AM To: [email protected] Subject: How set a build number from a text file I am a new baby to Jenkins and I could not go all the old posts to look for what I need help ! I have a Jenkins setup and my Jenkins monitors a specific file such as the lastbuildfound.txt in builds folder. This text file contains the last successful build no. Whenever this text file is updated with a new build number, my Jenkins will trigger by the FSTrigger Plugin . However, Jenkins generates a build number in sequence such as 1, 2, or etc. The reason I created this setup to run an automation on new build which I don't want to involve with a build person. The problem is that my Jenkins is not triggering by a source control, so I want to be able to get the build number from a text build and update the build number in Jenkins to match it. I know that there is the EnvInject plugin but I don't know how to use it or any methods. Please help me to achieve this issue and give me a clear instruction / steps. Thanks in advance. -- View this message in context: http://jenkins-ci.361315.n4.nabble.com/How-set-a-build-number-from-a-text-file-tp4744311.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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1427263995786-4744311.post%40n4.nabble.com. 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6C6EE445A6F6CE4E8A0FFB51B071A4E26E514984%40AMERMBX02.PERKINELMER.NET. For more options, visit https://groups.google.com/d/optout.
