Hello all, I ultimately figured out a way.. Infact, I change the approach from having multiple projects and kept it to a single project at Jenkins level. I declared few params in project as BUILD_BRANCH and PUSH_BRANCH. Next, I setup a cron job which passes these params in a CURL based query with credentials, job_name and token.
Thanks for all the support anyways. Helped me figured out a much scalable approach. Regards Amit On Thursday, March 3, 2016 at 3:17:25 PM UTC+5:30, Amit Bhardwaj wrote: > > I am thinking of trying an unconventional way. I can put current build # > in a file. Read that file on next build # and +1 it. All the projects can > use this file for their build # and this approach wont need any manual > intervention to supply build # as parameter. > > Not sure but worth a try as I feel. will share if that works. > > This email has been sent from a virus-free computer protected by Avast. > www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> > > <#CACyYpywC19p=0_weut1z9v-B6f8uWecMRROrKDZPurK=wZ+h4A@mail.gmail.com_-2105596715_DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > On Wed, Mar 2, 2016 at 7:00 PM, Michael Giroux <[email protected]> wrote: > >> Perhaps you could: >> 1. setup separate build for each branch, each job has a parameter to >> specify the build number >> 2. setup master job that has parameter to specify which branch to build. >> This job will have a build number that increments. This job starts the >> desired branch build passing the current build number in as a parameter. >> >> >> >> On Tuesday, March 1, 2016 at 11:07:18 PM UTC-7, Amit Bhardwaj wrote: >>> >>> Hello Michael, >>> >>> I really appreciate that you found time to answer my query. >>> >>> But, my requirement is to have separate projects in jenkins. I run >>> various integration tests after building binary. Idea is to do the same for >>> all new branches. I have setup cron to run these builds. >>> If I keep it parameterized, I believe I will have to run the builds >>> manually with new branch name everytime which is not intended. >>> >>> Regards >>> Amit >>> >>> On Wednesday, March 2, 2016 at 9:03:07 AM UTC+5:30, Michael Giroux wrote: >>>> >>>> If you want to share a single build number over all branch builds, you >>>> will want to configure your job to accept a branch name to be built. Then >>>> run as a parameterized build and specify the branch to build. This will >>>> give you build numbers like this: >>>> >>>> master: 1 >>>> master: 2 >>>> branch-a: 3 >>>> branch-b: 4 >>>> master: 5 >>>> branch-b: 6 >>>> ... >>>> >>>> Is this what you want? >>>> >>>> On Tuesday, March 1, 2016 at 12:25:22 AM UTC-7, Amit Bhardwaj wrote: >>>>> >>>>> Hi, >>>>> Thanks for the reply. I went through those links. I believe my >>>>> requirement is a bit different from those. >>>>> >>>>> I would need a universal sequence/build number which can be used by >>>>> multiple projects in Jenkins. >>>>> >>>>> Regards >>>>> AB >>>>> >>>>> On Friday, February 26, 2016 at 8:34:14 PM UTC+5:30, Victor Martinez >>>>> wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> You don't need to use Capital Cases at all, lower cases are in good >>>>>> shape and easy to read. >>>>>> >>>>>> Coming back to your questions: >>>>>> >>>>>> - >>>>>> https://wiki.jenkins-ci.org/display/JENKINS/Build+Name+Setter+Plugin >>>>>> might help you to set those numbers based on token/attributes >>>>>> - >>>>>> https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin >>>>>> is another way with more granularity >>>>>> >>>>>> I hope it helps >>>>>> >>>>>> On Friday, 26 February 2016 13:27:10 UTC, Amit Bhardwaj wrote: >>>>>>> >>>>>>> Hi Group! >>>>>>> >>>>>>> I have a requirement where I have 2-3 branches from a common master >>>>>>> (say A-dev, B-dev2.0, C-Qa) and I want to run Jenkins for each branch >>>>>>> and >>>>>>> check stability of my code and binaries. >>>>>>> >>>>>>> Currently I run Jenkins Project for 'master' branch only and with >>>>>>> each build I get a iterative next number as my build number (which is >>>>>>> default behavior). But now that I have multiple branches to build, I >>>>>>> have >>>>>>> to use Jenkins for all branches. >>>>>>> >>>>>>> I think I will need to create Jenkins Project for all branches but >>>>>>> don't know 'HOW CAN I KEEP BUILD NUMBER SEQUENCE" as same. >>>>>>> >>>>>>> Please let me know how can I achieve this. >>>>>>> >>>>>>> Regards >>>>>>> AB >>>>>>> >>>>>> >>>>>> >>>>>> >>>>> -- >> 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/3_eFjRFdpsk/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-users/ceffca55-aae6-4a51-80b1-2d36ffea7d8e%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-users/ceffca55-aae6-4a51-80b1-2d36ffea7d8e%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Regards > Amit Bhardwaj > -- 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/d97d557a-8686-485a-b6c9-47071a22cb35%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
