I am a newbie wrt jenkins. So I am sorry if this question is so naive. I would like to execute batch file on windows slave agent from jenkins project/job. Please let me know how to achieve the same.
Following is the log for the same.
Started by user Jenkins Admin Building remotely on slave01 in workspace d:\jenkins\workspace\Test Triggering Test � default Test � default completed with result FAILURE Finished: FAILURE
For Freestyle Project:-
Go to the configure option of the job and follow below (provide the Label of your agent in the Label Expression)
and select the Execute Windows batch command in configure
Use the below snippet in the jenkins file
stage ('Build') {
steps {
node(label: 'AgentName') {
bat "batch script location"
}
}
}