Jenkins Problem with the script Can anyone help

0 votes
Stage("execution")
{
Steps{
bat 'start cmd.exe /c c://users//doc//sample.bat'
}}

The above script is just opening the cmd prompt and executing it. it's not taking the output of the execution.

Even if the execution is failed the stage is showing as successful and passing to the next stage deploying ....so I want yo develop it so that the output in the cmd prompt should take as input by Jenkins and the stage should go on ...if it fails in cmd prompt the stage in Jenkins should also fail ...if the execution is successful in cmd prompt the stage should be successful in Jenkins.

Can anyone help?
Sep 30, 2020 in Jenkins by anonymous
• 19,580 points
60 views

1 answer to this question.

0 votes
Refer to user input... In Jenkins pipeline script.

That should be able to help.
answered Sep 30, 2020 by Adil Abdullah Khan

Related Questions In Jenkins

0 votes
1 answer
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
954 views
+2 votes
1 answer
0 votes
1 answer

How to deploy the war file in Tomcat Server with Jenkins pipeline job on an windows machine?

Use deploy to container plugin. Go to the ...READ MORE

answered Sep 30, 2020 in Jenkins by Adil Abdullah Khan
1,141 views