How to trigger remote deploy using Jenkins on another server

439 views
Skip to first unread message

Ricky LI

unread,
Oct 12, 2018, 5:11:11 AM10/12/18
to Jenkins Users
Hello,

I got a problem with jenkins. Now I have a jenkins server running, pulling source code from our SVN server, the builds are successfully done.

However, there's some other scripts  ( or deployment) on the SVN server that need to be executed once all projects are built successfully, how could I tell jenkins to trigger automatically these scripts on a remote server to deploy everything after builds ?

If anyone knows the how, I will appreciate the help, thanks !

Denis Mone

unread,
Oct 12, 2018, 7:20:49 AM10/12/18
to jenkins...@googlegroups.com
You could create another job that calls those scripts and schedule it to run after the builds are
finished.
You could do that either by scheduling the build as a downstream inside your pipeline, or by configuring it to build
after the specified jobs are finished.

Qi Li

unread,
Oct 12, 2018, 9:31:13 AM10/12/18
to jenkins...@googlegroups.com
thank you for your reply.

so if my understanding is correct, I can do this by configuring an agent on that remote server, so this job runs on that server ? this is the only way I know for Jenkins to remotely access another machine to perform tasks 

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CADCvpUfaL0g8n7MJZWB9jH7kaVbr5QptmvSVg-gnL_91necCqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Denis Mone

unread,
Oct 12, 2018, 10:55:08 AM10/12/18
to jenkins...@googlegroups.com
Correct, you can configure a new agent on the server SVN is installed, and configure the job to run only on that specific server.

Qi Li

unread,
Oct 12, 2018, 12:42:42 PM10/12/18
to jenkins...@googlegroups.com
we will try that, thanks alot :)

Quang Truong

unread,
Oct 12, 2018, 12:56:42 PM10/12/18
to Jenkins Users
Another way that you can use any configuration management tool to trigger the remote process, for me, I use Ansible, it's an agentless tool, you can also take a look on other tools such as puppet, chef or salt. Your scenario is quite usual, build (on Jenkins slave) => deploy (on other machine), usually we use those CM tool for the remote configuration.

If you're working on Windows, another way should be WinRM but you have to open the firewall that might loosen your security setting.
Reply all
Reply to author
Forward
0 new messages