I am trying to create a task that will execute a program for remote agents. The program is exe when the agent is in Windows or the shell script when it is in Linux. The program is already deployed on agents. I am looking for a solution that would allow me to conditionally run exe (Windows executable command line) or the shell (Execute shell) depending on the operating environment of the agent.
So far, I have discovered that there is a plug-in for the conditions of execution ( https://wiki.jenkins-ci.org/display/JENKINS/Run+Condition+Plugin ), which would be great, unfortunately, it does not have validation for the operating system the operator.
Is there any way to do this? Google doesn't tell me anything.
source
share