Jenkinsfile Beginner Tutorial 1 | What is Jenkinsfile | How to create jenkinsfile | Step by Step

  Рет қаралды 78,065

Automation Step by Step

Automation Step by Step

Күн бұрын

Пікірлер: 106
@testingtrail
@testingtrail 4 жыл бұрын
Thanks for explaining difference between scripted and declarative! You are the guy that best describes it. Looking forward for more to apply to my Cypress project!
@RaghavPal
@RaghavPal 4 жыл бұрын
Awesome, thank you! Jorge
@dacepetersone2095
@dacepetersone2095 2 жыл бұрын
Thank you, this was really for total beginners like me. Finally I managed with your tutorial.
@RaghavPal
@RaghavPal 2 жыл бұрын
Most welcome Dace
@matt-g-recovers
@matt-g-recovers 3 жыл бұрын
Dude, your channel is fantastic for where I am in my career right now! How lucky am I to have found this channel? ...Man, ...thank you!
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Matt, great to know, can see this too - automationstepbystep.com/
@dronefilmsgermany
@dronefilmsgermany 2 жыл бұрын
I am a total newbie from system administration background. the video was so clear and easy to understand.
@RaghavPal
@RaghavPal 2 жыл бұрын
happy to know this
@vijayakanth308
@vijayakanth308 4 жыл бұрын
I Fallen In Love With Your Tutorial Videos
@RaghavPal
@RaghavPal 4 жыл бұрын
I am so happy & humbled to know this Vijaya
@shashankchoubey4274
@shashankchoubey4274 4 жыл бұрын
Great Raghav It's a Very interesting session . Please make more video on Jenkinsfile
@RaghavPal
@RaghavPal 4 жыл бұрын
Next video coming soon Shashank
@shubhamprasad3213
@shubhamprasad3213 4 жыл бұрын
I was waiting for Jenkins 🥺
@RaghavPal
@RaghavPal 4 жыл бұрын
Jenkins Masterclass is coming soon
@nitishchauhan4256
@nitishchauhan4256 4 ай бұрын
Very nice 👍
@RaghavPal
@RaghavPal 4 ай бұрын
Thanks Nitish
@hemanthp8587
@hemanthp8587 2 жыл бұрын
i am about to start one of your jenkins playlist which is 6 years old. Is the concepts same now also when compared to 6 years old playlist.
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Hemanth, the basic structure and concepts are still the same, If you like can first do Jenkins Masterclass which is more recent - kzbin.info/www/bejne/raCwcoukacprhKM&vl=en
@hemanthp8587
@hemanthp8587 2 жыл бұрын
@@RaghavPal Thanks raghav you have conveyed the topics in a great way
@shafy7970
@shafy7970 4 жыл бұрын
Love this ❤️❤️...keep on Rocking 👍👍
@RaghavPal
@RaghavPal 4 жыл бұрын
Thanks for watching
@jayantamandal9732
@jayantamandal9732 4 жыл бұрын
Thanks a Lot Raghav for this session.Will the sh command in Jenkinsfile will work in windows machine eg: sh 'mvn clean install -Denv=qa'
@RaghavPal
@RaghavPal 4 жыл бұрын
on windows sh may not work
@amjads8971
@amjads8971 4 жыл бұрын
Sh is not work in windows only mvn clean commands. Install gitbash and you should be able to use sh
@manishaverma81
@manishaverma81 2 жыл бұрын
Thank You sir.. this is very helpful 👍
@RaghavPal
@RaghavPal 2 жыл бұрын
Most welcome Manisha
@gitikasurana843
@gitikasurana843 Жыл бұрын
Thanks, but I have one doubt, I have to trigger a job which is currently running on different build number and build number is defined as a parameter in a downstream job. So can you please help me on how to define the build number in the jenkinsfile ?
@RaghavPal
@RaghavPal Жыл бұрын
Hi Gitika, In Jenkins, you can trigger a downstream job and pass parameters using the build step in your Jenkinsfile. The build step takes a job name and an optional map of parameters, which can include the build number. Here is an example of how you can define the build number in your Jenkinsfile: pipeline { agent any stages { stage('Build') { steps { echo 'Building...' } } stage('Trigger Downstream Job') { steps { build job: 'DownstreamJobName', parameters: [ string(name: 'BUILD_NUMBER', value: env.BUILD_NUMBER) ] } } } } In this example, the BUILD_NUMBER parameter is passed to the downstream job and its value is set to the env.BUILD_NUMBER environment variable, which contains the current build number. Note that the DownstreamJobName must be the name of the actual downstream job in Jenkins. You can also pass other parameters, such as strings or booleans, to the downstream job using the parameters map.
@rekhamalik3663
@rekhamalik3663 2 жыл бұрын
Thank you for explaining in such a nice way!
@RaghavPal
@RaghavPal 2 жыл бұрын
Most welcome Rekha
@shivamanand8998
@shivamanand8998 2 жыл бұрын
Thank you this video was very helpful
@RaghavPal
@RaghavPal 2 жыл бұрын
Glad it was helpful Shivam
@abhaypatel8722
@abhaypatel8722 2 жыл бұрын
can you please explain how to create env variable in jenkin and assign its value from shell script and then use it in some other step , i am not able to assign its value in shell script
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Abhay, I will try to add a session, meanwhile can check online examples
@hieunguyenofficial9497
@hieunguyenofficial9497 4 жыл бұрын
I love your tutorial videos. Thanks.
@RaghavPal
@RaghavPal 4 жыл бұрын
You are welcome Hieu
@vishwagowda875
@vishwagowda875 2 жыл бұрын
Hi sir I need to create directory and clone the git repository inside the directory in the jenkins pipeline itself how to do that
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Vishwa, this can help - stackoverflow.com/questions/61146986/how-to-clone-a-github-repository-using-jenkins-pipeline-script I will plan to add a session when I get time
@bhaumik17able
@bhaumik17able 4 жыл бұрын
Big fan of your teaching style Raghav sir. Awesome video and content. My question is that are you going to cover full jenkins video playlist? Thank you again
@RaghavPal
@RaghavPal 4 жыл бұрын
Yes, a Masterclass on Jenkins is coming soon
@devikabraj731
@devikabraj731 3 жыл бұрын
superb topic
@RaghavPal
@RaghavPal 3 жыл бұрын
Thanks
@suchishah8332
@suchishah8332 3 жыл бұрын
Thank u for such nice explanation
@RaghavPal
@RaghavPal 3 жыл бұрын
Most welcome Suchi
@prashanth6848
@prashanth6848 3 жыл бұрын
Great information. Thanks for sharing.
@RaghavPal
@RaghavPal 3 жыл бұрын
Glad it was helpful!
@kenchattys6733
@kenchattys6733 4 жыл бұрын
All your videos are very informative and easily understandable.. This makes all to understand topics nicely.. One question out of syllabus.. Which camera and editing software u use ?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Kenchatty, I used QuickTimePro and iMovies here
@rahulgupta-fp5vy
@rahulgupta-fp5vy 3 жыл бұрын
big like for this video
@RaghavPal
@RaghavPal 3 жыл бұрын
thanks
@75devendrasahu
@75devendrasahu 4 жыл бұрын
Hello Sir, I don't know much about Jenkins, but want to learn. I have a case when I push some file on git and this trigger Jenkins job to deploy the same file to multiple servers(windows and Linux), thus this can be achieved by Jenkins? As per understanding Jenkins is CD tools that why I think to correlate the task. Please confirm I'm correlating right things? Thanks
@RaghavPal
@RaghavPal 4 жыл бұрын
Yes, you can do Devendra, pls watch my Jenkins tutorials here - automationstepbystep.com/
@75devendrasahu
@75devendrasahu 4 жыл бұрын
@@RaghavPal yes, I'm already watching KZbin video this, does I go for Udemy tutorials as well ? Thanks
@umangsingh6881
@umangsingh6881 3 жыл бұрын
really amazing sir.
@RaghavPal
@RaghavPal 3 жыл бұрын
Thanks a lot Umang
@JRiyaz
@JRiyaz 4 жыл бұрын
I'm getting 'java.lang.IllegalArgumentException: Unsupported class file major version 59' exception. I've followed all the instructions as you said.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Riyaz, what is the ver of java on your system, pls check. As of now Jenkins can work with Java 8 or 11
@swatzy20
@swatzy20 3 жыл бұрын
Can you pls share a video on how to setup a windows slave node for Linux Jenkins master . If already present pls could you share the link
@RaghavPal
@RaghavPal 3 жыл бұрын
I will plan Swathish
@dilansomarathne9680
@dilansomarathne9680 4 жыл бұрын
Great tutorial, Thanks!
@RaghavPal
@RaghavPal 4 жыл бұрын
You're welcome Dilan
@lifestylenounou3452
@lifestylenounou3452 4 жыл бұрын
Thanks a lot, please if u can make a video about how automation works in radiostation, storage database request and configurations..
@RaghavPal
@RaghavPal 4 жыл бұрын
I will check if I can plan something on this
@lifestylenounou3452
@lifestylenounou3452 4 жыл бұрын
@@RaghavPal thank you very much
@sangeetham971
@sangeetham971 4 жыл бұрын
Hi Raghav, I am having some issue with my Jenkins pipeline.Getting error as unable to find main class but In local.its running fine.can u pls help me
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sangeetha, can you point in the video exactly where you are facing the issue, In case you are getting jenkinsfile from SCM, I will explain that in next video
@sangeetham971
@sangeetham971 4 жыл бұрын
@@RaghavPal I am getting file not found exception config . properties. Do I need to write shell script for adding config file
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sangeetha, is this part of some project OR you are doing exactly as. per this video, In case you are just following this, let me know the time in the video where you are facing issues
@vipan16
@vipan16 4 жыл бұрын
Can you please do the video with Azure dev ops since some companies required to have knowledge of devops . Moreover you can do everything on devops
@RaghavPal
@RaghavPal 4 жыл бұрын
Sure Vipan, I will do
@vipan16
@vipan16 4 жыл бұрын
@@RaghavPal Thank you and I appreciate your help !!
@lakshmananumanchipalli3557
@lakshmananumanchipalli3557 2 жыл бұрын
Hi sir I need some help from you to fix my Jenkins issue. I tried to login Jenkins with my credentials..but it is throwing 401 error. It is showing welcome to Jenkins page. But showing invalid username and password. It's not the issue with the credentials. Even all my team also facing the same issue. What is the Root cause? How to fix this issue?
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Lakshman, to reconfigure security options in the config.xml file. Check Jenkins config.xml file which holds all the information related to the security realm and the authorization strategy This file is located in the /var/lib/jenkins directory One thing you must know is that, by disabling the security any anonymous user can access your Jenkins
@lakshmananumanchipalli3557
@lakshmananumanchipalli3557 2 жыл бұрын
@@RaghavPal I disabled the usesecurity. And now Jenkins is up and running. But I'm Jenkins pipelines are missing. Wat might be the cause?
@RaghavPal
@RaghavPal 2 жыл бұрын
will need to check
@samkamal7263
@samkamal7263 4 жыл бұрын
Hi Raghav. When i tried to run the job for jmeter cmd from jenkin with Windows batch command, getting below error. can you please give your suggestion: " Building in workspace C:\Users\Sam\.jenkins\workspace\JmeterUserTest [JmeterUserTest] $ cmd /c call C:\Users\Sam\AppData\Local\Temp\jenkins6320711695279540982.bat The syntax of the command is incorrect."
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sam, show me your command, check the syntax again
@samkamal7263
@samkamal7263 4 жыл бұрын
@@RaghavPal I have used the below cmd D:\Jmeter\apache-jmeter-5.3\bin> -n -t D:\Jmeter\apache-jmeter-5.3\Project\UserReg\FirstTimeUserRegistration.jmx -l D:\Jmeter\apache-jmeter-5.3\Reports eport.jtl
@samkamal7263
@samkamal7263 4 жыл бұрын
@@RaghavPal When tried command for Date, in console output i got the below message Started by user admin Running as SYSTEM Building in workspace C:\Users\Sam\.jenkins\workspace\testJob [testJob] $ cmd /c call C:\Users\Sam\AppData\Local\Temp\jenkins6322622250637004343.bat C:\Users\Sam\.jenkins\workspace\testJob>date The current date is: 07-02-2021 Enter the new date: (dd-mm-yy) C:\Users\Sam\.jenkins\workspace\testJob>exit 1 Build step 'Execute Windows batch command' marked build as failure Finished: FAILURE
@samkamal7263
@samkamal7263 4 жыл бұрын
@@RaghavPal I have got build success in output console. Thanks for your time.
@sanksars1313
@sanksars1313 4 жыл бұрын
Pls put videos for Angular 10 and ReactJS
@RaghavPal
@RaghavPal 4 жыл бұрын
I will plan
@kavishautomationfactory170
@kavishautomationfactory170 4 жыл бұрын
Thanks Ragahv.
@RaghavPal
@RaghavPal 4 жыл бұрын
Most welcome Kavish
@kubertrasad
@kubertrasad 4 жыл бұрын
Thanks☺
@RaghavPal
@RaghavPal 4 жыл бұрын
You're welcome!
@ramyas5152
@ramyas5152 Жыл бұрын
How to download Jenkins
@RaghavPal
@RaghavPal Жыл бұрын
what OS are you using, Installation is explained in the video. Please let me know the exact issue in detail. Can also follow this - kzbin.info/www/bejne/raCwcoukacprhKM
@raghavmalhotra3318
@raghavmalhotra3318 3 жыл бұрын
Bro please help 🙏to complete my assignment "Install Jenkins on your laptop Install Mysql on your laptop Create a dummy DB (say testdb) and a Contact table with columns Firstname, Lastname, Phone, Mobile, email Write a Jenkins pipeline which takes an sql statement as a parameter like Insert statement into Contact table Add a new mysql DB user with password (this is at Mysql level and not in the Contact table) Alter table statement for adding address column to Contact table " This is my assignment and I easily install jenkin and mysql and I also create table in my sql but in 3rd step I don't know how I done this... please help
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Raghav, create a complete session may take time, but you will find helpful tutorials for your step. Can check automationstepbystep.com/
@somanathmuduli4838
@somanathmuduli4838 3 жыл бұрын
Hello sir Hope you doing well , i saw this series & one of my colleague suggest me . You are amazing. Your 2017 videos , And now this video is feels like you became a rocket & a expert one. Genius one @Raghav Pal
@RaghavPal
@RaghavPal 3 жыл бұрын
Thanks a lot Somanath
@amjads8971
@amjads8971 4 жыл бұрын
Love it
@RaghavPal
@RaghavPal 4 жыл бұрын
Thanks a lot
@vimanthaperera3540
@vimanthaperera3540 3 жыл бұрын
Hello Raghav! Thanks to you I have come this far in Jenkins. I have my pipeline script which contains two stages which are build one and build two respectively. I have an active choice parameter[1] which contains a single select choice list. In build 2 I have an active choice reference parameter[2] which refers the above mentioned active choice parameter[1]. From my build one stage it generates a test.txt file. As I have mentioned in my build two active choice reference parameter[2] I want to read the above text.txt file and return the values by using split(',') or tokensize(',') as a single select parameter. def fileContents = new File('C:/Users/Vimantha/Desktop/macAdds.properties').text.tokenize( "," ) return fileContents I have used this inside the active choice reference parameter[2] script. But it gives me a error and doesn't execute. Can you help me with this? or is there any other way to do this?
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Vimantha, will need to check the error and logs
@vimanthaperera3540
@vimanthaperera3540 3 жыл бұрын
@@RaghavPal Is there any possible way to contact you?
@RaghavPal
@RaghavPal 3 жыл бұрын
Commenting here is the best way
@vimanthaperera3540
@vimanthaperera3540 3 жыл бұрын
pipeline { agent any parameters{ string(name: 'IP_ADDRESS', defaultValue: '', description: 'Enter server IP address') string(name: 'USERNAME', defaultValue: '', description: '') string(name: 'PASSWORD', defaultValue: '', description: '') } environment{ VERSION='1.3.0' } stages { stage('Build') { steps { echo 'Built' sh(script:"python sshMac.py ${IP_ADDRESS} ${USERNAME} ${PASSWORD}", returnStatus: true, returnStdout: true) } } stage('Test') { steps { script{ env.FILENAME = readFile 'macAdds.properties' env.FILEDATA = FILENAME.tokenize( "," ) input message: 'Please choose one', parameters: [ [$class: 'ChoiceParameter', choiceType: 'PT_SINGLE_SELECT', description: 'Select the Environemnt from the Dropdown List', filterLength: 1, filterable: false, name: 'ENVIRONMENT', script: [$class: 'GroovyScript', fallbackScript: [ classpath: [], sandbox: true, script: 'return ["ERROR"]' ], script: [ classpath: [], sandbox: true, script: """ return['1', '2', '3', '4'] """.stripIndent() ] ] ], [$class: 'ChoiceParameter', choiceType: 'PT_SINGLE_SELECT', description: 'Select the Environemnt from the Dropdown List', filterLength: 1, filterable: false, name: 'ENVIRONMENT2', script: [$class: 'GroovyScript', fallbackScript: [ classpath: [], sandbox: true, script: 'return ["ERROR"]' ], script: [ classpath: [], sandbox: true, script: """ return['1', '2', '3', '4', '5'] """.stripIndent() ] ] ], [$class: 'CascadeChoiceParameter', choiceType: 'PT_SINGLE_SELECT', description: 'Select a choice', filterLength: 1, filterable: false, name: 'choice1', referencedParameters: 'ENVIRONMENT', script: [$class: 'GroovyScript', fallbackScript: [ classpath: [], sandbox: true, script: 'return ["ERROR"]' ], script: [ classpath: [], sandbox: true, script: """ def tokens = ${FILENAME}.tokenize(',') switch(ENVIRONMENT) { case "1": return ${env.FILEDATA} case "2": return ${env.FILEDATA} case "3": return ${env.FILEDATA} case "4": return ${env.FILEDATA} } """ ] ] ], text(name: 'vertical', defaultValue: "${FILENAME}") ] } echo 'Testing' echo "${FILENAME}" echo "${FILEDATA}" } } stage('Deploy') { steps { echo 'Deploying' } }
@vimanthaperera3540
@vimanthaperera3540 3 жыл бұрын
Theres no error or logs it doesnt return any value for the switch case for FILEDATA. Moreover when I echo it (I have echod it under the switch case after the script) it gives me a perfect list. why it doesnt return the FILEDATA value in the script
@shashankchoubey4274
@shashankchoubey4274 4 жыл бұрын
Great Raghav It's a Very interesting session . Please make more video on Jenkinsfile
@RaghavPal
@RaghavPal 4 жыл бұрын
I will do the next video soon
@BJDuncan
@BJDuncan 4 жыл бұрын
Thank you. Great video 🙏
@RaghavPal
@RaghavPal 4 жыл бұрын
Glad it was helpful!
Jenkinsfile Beginner Tutorial 2 | How to get Jenkinsfile from Git SCM
7:27
Automation Step by Step
Рет қаралды 45 М.
Vampire SUCKS Human Energy 🧛🏻‍♂️🪫 (ft. @StevenHe )
0:34
Alan Chikin Chow
Рет қаралды 138 МЛН
"Идеальное" преступление
0:39
Кик Брейнс
Рет қаралды 1,4 МЛН
УЛИЧНЫЕ МУЗЫКАНТЫ В СОЧИ 🤘🏻
0:33
РОК ЗАВОД
Рет қаралды 7 МЛН
Microservices explained - the What, Why and How?
18:30
TechWorld with Nana
Рет қаралды 912 М.
What does larger scale software development look like?
24:15
Web Dev Cody
Рет қаралды 1,5 МЛН
JMeter Full Course Masterclass | Step by Step for Beginners | Raghav Pal |
3:31:26
Automation Step by Step
Рет қаралды 1 МЛН
Jenkins Beginner Tutorial 5 - How to create Users + Manage + Assign Roles
17:58
Automation Step by Step
Рет қаралды 284 М.
Complete Jenkins Pipeline Tutorial | Jenkinsfile explained
35:06
TechWorld with Nana
Рет қаралды 810 М.
Learn Jenkins! Complete Jenkins Course - Zero to Hero
1:08:28
DevOps Journey
Рет қаралды 909 М.
Jenkins Beginner Tutorial 12 - How to do Automated Deployment (Step by Step)
11:51
Automation Step by Step
Рет қаралды 363 М.
API vs SDK: What’s the Difference?
3:42
Klippa
Рет қаралды 16 М.