This is a Jenkins user question rather than a Jenkins dev question.  The
Jenkins developer list is used for discussions of developing things for
Jenkins, not for discussion of ways to use Jenkins to develop other things.

In your case, the answer is, yes, you can run a script on a Unix server
from Jenkins on Windows.

You'll need a program that will allow you to run the 'ssh' command on
Windows and have it run the 'sudo /sbin/shutdown -r now' command.  Git for
Windows provides ssh.  Windows subsystem for Linux provides ssh.  The
chocolatey package manager for Windows includes a Win32 OpenSSH.  Cygwin
provides ssh.  I'm sure there are others as well.

The user on the remote Linux system needs to be configured to allow the
/sbin/shutdown script to be run from sudo.  Refer to the 'sudo' man page
and other online guides for sudo configuration instructions.

If those instructions are not sufficient to answer your question, please
ask the question on the Jenkins users list.  There are more people on that
list than on this list and they are more likely to have dealt with this
type of question.

Mark Waite

On Wed, Mar 13, 2019 at 1:52 PM Prasu S <[email protected]> wrote:

> We would like to run a restart script on Unix server(test) from
> Jenkins(windows) using sudo commands? Is this possible in Jenkins? What are
> the steps involved? Thanks in Advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/46863013-c7b9-48ad-9243-744b6bc1465a%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/46863013-c7b9-48ad-9243-744b6bc1465a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Thanks!
Mark Waite

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtGKvrakq%3Dtaf9H%2BrbPQJRBpAai1McJxwHcteU%2BCC5b6Og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to