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!
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
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
Hi Hemanth, the basic structure and concepts are still the same, If you like can first do Jenkins Masterclass which is more recent - th-cam.com/video/woMAXn4e8NA/w-d-xo.html&vl=en
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 ?
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 ?
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.
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
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
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
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
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
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 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
@@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
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
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?
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
what OS are you using, Installation is explained in the video. Please let me know the exact issue in detail. Can also follow this - th-cam.com/video/woMAXn4e8NA/w-d-xo.html
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?
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
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!
Awesome, thank you! Jorge
Thank you, this was really for total beginners like me. Finally I managed with your tutorial.
Most welcome Dace
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!
Hi Matt, great to know, can see this too - automationstepbystep.com/
I am a total newbie from system administration background. the video was so clear and easy to understand.
happy to know this
I Fallen In Love With Your Tutorial Videos
I am so happy & humbled to know this Vijaya
Great Raghav It's a Very interesting session . Please make more video on Jenkinsfile
Next video coming soon Shashank
I was waiting for Jenkins 🥺
Jenkins Masterclass is coming soon
Thank you for explaining in such a nice way!
Most welcome Rekha
I love your tutorial videos. Thanks.
You are welcome Hieu
Very nice 👍
Thanks Nitish
Love this ❤️❤️...keep on Rocking 👍👍
Thanks for watching
Thank you this video was very helpful
Glad it was helpful Shivam
Thank You sir.. this is very helpful 👍
Most welcome Manisha
Great information. Thanks for sharing.
Glad it was helpful!
Thank u for such nice explanation
Most welcome Suchi
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
Yes, a Masterclass on Jenkins is coming soon
Great tutorial, Thanks!
You're welcome Dilan
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
Thanks a lot Somanath
really amazing sir.
Thanks a lot Umang
superb topic
Thanks
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.
Hi Hemanth, the basic structure and concepts are still the same, If you like can first do Jenkins Masterclass which is more recent - th-cam.com/video/woMAXn4e8NA/w-d-xo.html&vl=en
@@RaghavPal Thanks raghav you have conveyed the topics in a great way
big like for this video
thanks
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 ?
Hi Kenchatty, I used QuickTimePro and iMovies here
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 ?
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.
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'
on windows sh may not work
Sh is not work in windows only mvn clean commands.
Install gitbash and you should be able to use sh
Thanks Ragahv.
Most welcome Kavish
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
Hi Abhay, I will try to add a session, meanwhile can check online examples
Thanks a lot, please if u can make a video about how automation works in radiostation, storage database request and configurations..
I will check if I can plan something on this
@@RaghavPal thank you very much
Thanks☺
You're welcome!
Hi sir I need to create directory and clone the git repository inside the directory in the jenkins pipeline itself how to do that
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
I'm getting 'java.lang.IllegalArgumentException: Unsupported class file major version 59' exception. I've followed all the instructions as you said.
Hi Riyaz, what is the ver of java on your system, pls check. As of now Jenkins can work with Java 8 or 11
Love it
Thanks a lot
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
I will plan Swathish
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
Sure Vipan, I will do
@@RaghavPal Thank you and I appreciate your help !!
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
Yes, you can do Devendra, pls watch my Jenkins tutorials here - automationstepbystep.com/
@@RaghavPal yes, I'm already watching TH-cam video this, does I go for Udemy tutorials as well ?
Thanks
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
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
@@RaghavPal I am getting file not found exception config . properties. Do I need to write shell script for adding config file
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
Pls put videos for Angular 10 and ReactJS
I will plan
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."
Hi Sam, show me your command, check the syntax again
@@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
@@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
@@RaghavPal I have got build success in output console. Thanks for your time.
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
Hi Raghav, create a complete session may take time, but you will find helpful tutorials for your step. Can check automationstepbystep.com/
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?
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
@@RaghavPal I disabled the usesecurity. And now Jenkins is up and running. But I'm Jenkins pipelines are missing. Wat might be the cause?
will need to check
How to download Jenkins
what OS are you using, Installation is explained in the video. Please let me know the exact issue in detail. Can also follow this - th-cam.com/video/woMAXn4e8NA/w-d-xo.html
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?
Hi Vimantha, will need to check the error and logs
@@RaghavPal Is there any possible way to contact you?
Commenting here is the best way
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'
}
}
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
Great Raghav It's a Very interesting session . Please make more video on Jenkinsfile
I will do the next video soon
Thank you. Great video 🙏
Glad it was helpful!