On Fri, Sep 14, 2018 at 8:49 AM Arianrhod <helen.j.he...@gmail.com> wrote:

> Hi, I have to run two shell scripts on a remote server as part of a
> pipeline job (scripted, not via the GUI).
>
> They're both run on the same remote server, but one has to run when the
> first finishes, and they run as different users.  There is a 'jenkins' user
> account that has creds in the Jenkins creds store, that has full sudo
> access on all remote servers.
>
> Shell script one has to be run as user abc, shell script two has to be run
> as root.
>
> I have the sshAgent plugin on my Jenkins server, but cannot install any
> new plugins.
>
> Can anyone give me any idea how this can be achieved, please ... I have
> been trawling through endless Google pages for over a week trying to figure
> it out, and drawing a blank.  I'm completely new to scripting jenkinsfiles!
>

I might be missing something simple, but I would think you'd just use the
"sh" pipeline step and run "ssh" with the remote command line to run.


> thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/859367d8-2038-4ef4-9b7c-c25e9ed12d6a%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/859367d8-2038-4ef4-9b7c-c25e9ed12d6a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAA5t8VofuTAr6K3Y_SQnxWbKhUZLNJKBz%3DssHeUoTmaOOu140g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to