I have a Maven build of a Java application that runs successfully on either Linux or Windows by typing the identical command mvn install.
However, using the Jenkinsfile method of setting up this build, on Linux that file needs to contain sh mvn install and on windows bat mvn install.
If paths and tools are configured appropriately on Windows, log shows:
[Pipeline] sh
[C:\tools\jenkins\workspace\DSL\master] Running shell script
sh: C:\tools\jenkins\workspace\DSL\master@tmp\durable-60527040\script.sh: command not found
Is there any way for a single Jenkinsfile to allow building in both environments?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)