Jenkins in Tamil 38 How to reset build number in jenkins |Jenkins for Beginners with Eng Subs
Jenkins in Tamil 38 How to reset build number in jenkins |Jenkins for Beginners with Eng Subs
#jenkins #jenkins_in_tamil #devops #devops_in_tamil #jenkinstutorial #jenkinsvideos
Jenkins in Tamil 38 How to reset build number in jenkins |Jenkins for Beginners with English Subtitles
• Jenkins in Tamil 38 How to reset buil…
Join this channel to get access to perks:
/ @tamiltutera
Site: https://tamiltutera.com
linkedIn: https://www.linkedin.com/in/tamiltutera/
Telegram Link: https://t.me/tamiltutera
Youtube Channel: / tamiltutera
Blog: https://tamiltutera.blogspot.com/
Like Facebook Page : https://www.facebook.com/tamiltutera
Follow us on Twitter: https://twitter.com/tamiltutera
Blog : https://tamiltutera.blogspot.com
Jenkins in Tamil 37 How to use an input in jenkins |Jenkins for Beginners in Tamil | DevOps in Tamil
• Jenkins in Tamil 37 How to use an inp…
#devops #devops_in_tamil #devopspcsglobal #jenkins #jenkins_in_tamil #jenkins_pipeline #jenkins_groovy #groovy #devopsenterprisesummit #devopstutorial #devopsonlinetraininginbangalore #devopshandson #devopspcsglobal #devopspcsglobal #devopsonlinetraininginhyderabd #devopstrainingvideos
Content
2.388 -> Hi guys, welcome to Tamil Tutor
4.16 -> Today we are going to see how to reset a build number in Jenkins
8.62 -> In Jenkins, when we build a job, a build number will be generated
13.58 -> So how to reset the build number
16.38 -> If you want to start a custom build number from 40, 50 or 101
23.22 -> So you can start from where you want to start
26.42 -> You can create a job from 100
32.66 -> So we are going to see how to create a job in this video
36.34 -> Watch this video fully, then you will understand this video easily
44.3 -> So don't miss this video, let's go to the video
47.9 -> This is my Jenkins dashboard, I have a test job
54.98 -> In this job, my job build number is 1, 2, 3
62.02 -> If you want to start a job from 40 or 100
68.26 -> So how to bring that job
71.54 -> I am going to the manage in Jenkins dashboard
75.98 -> In the script console, you can execute groovy scripts
83.74 -> So type in arbitrary groovy script and execute on the server
87.3 -> You can execute arbitrary scripts like hotdog scripts
97.18 -> So what we are going to do is
100.18 -> We are going to reset the build number
107.22 -> So how to reset it
109.22 -> We are going to start from 100 or 101
114.9 -> So how to do that
116.9 -> First, we are going to import the functions in the Jenkins.instance
127.54 -> So in the functions, we are going to import the get item by full
134.409 -> name
134.9 -> So item is nothing but job item
139.5 -> So we are going to get the full name of the job item
145.58 -> So in that, we are going to update the next build number
152.3 -> So if I want to start from 101
158.54 -> So I am going to fix the update next build number from 101
164.02 -> So if I execute, no output is coming
168.54 -> Because it is just updated
170.54 -> But we have not executed yet
173.18 -> So how to get the next build number
176.46 -> So we are going to get the next build number
179.98 -> So instead of update, we are going to give get next build number
185.94 -> So if I run this, the result is that the next build number is
190.833 -> going to start from 101
192.58 -> So what I am going to do next is
195.3 -> We have set the next build number
200.06 -> So I am going to the job
202.54 -> So I am going to the job and I am going to give the build number
205.38 -> So here is the job item build number
207.86 -> So it is 101, let us execute it
216.06 -> So it is 101, we have set 101 and it is updated
221.34 -> So we have tested the next build number and it is 101
224.62 -> We have given the build now
227.62 -> So the build number 101 is also updated
230.34 -> So if you see here, it is written as hello world
232.82 -> So it started from 101
235.42 -> So if you want to start from 1, you can do that too
242.74 -> So how to do that
244.74 -> So we are going to see how to build and reset the file one by
255.053 -> one
255.74 -> So I am going to give the job name as Jenkins.instance.getitem
267.74 -> So this is the job name
272.74 -> So we are going to take each build
275.74 -> So item.builds.each
277.74 -> So we are going to delete the build inside that
283.74 -> So build.delete
289.74 -> So after resetting the file, we are going to see where to start
295.74 -> So update next build number, so we are going to start from 1
303.74 -> So we are deleting all the builds
306.74 -> So after deleting, we are going to give update next build number
310.432 -> 1
310.74 -> So what you are going to do is
312.74 -> Before doing this, you have to think
314.74 -> If you delete the build, the job name, artifacts, credentials,
324.152 -> and the previous history will be deleted
330.74 -> So you have to be very careful while deleting
335.74 -> So think before deleting, otherwise you cannot remove it
339.74 -> So these are the important instructions, so follow them
344.74 -> Before deleting the build, follow these instructions
348.74 -> Or you can backup and delete it
350.74 -> So I have given the update next build number
354.74 -> So we have already seen this job
357.74 -> So it came from 1, 1, 2, 3, 101
361.74 -> So what I am going to do is
364.74 -> I am going to execute this, I am going to run it
367.74 -> So update build number 1 came
370.74 -> So no output will come here, because we are updating, we have
373.74 -> not yet got it
374.74 -> If you try to get it, you will get it if you give the next build
384.152 -> number
384.74 -> So if you have any doubt, you can go to the previous command
388.454 -> line
388.74 -> So get instance.getitemByFullNameTestJob.getNextBuildNumber
403.74 -> So it started from 1, I have already told that
409.74 -> So what I am going to do is, I am going to refresh this
413.74 -> So which build is no builds
415.74 -> So if I give the build, build number 1 will start here
419.74 -> So build number 1 is started, so all over success
423.74 -> So this is how we reset the build number in Jenkins
427.74 -> So if you like this video, like, comment and subscribe
430.74 -> Don't forget to click the bell button
[Powered By Dubverse]
Source: https://www.youtube.com/watch?v=BthfFQsDjYQ