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!
thanks