I'm on a Windows Server and I want to have a pipeline project on Jenkins that basically does this:

  • SVN update
  • Build
  • Deploy

As the deploy target machine is on a different network, I want to know how to start a VPN connection before to do the deploy.

Note: My general goal is to automate deployment to a server in a VPN. Currently the VPN is Cisco AnyConnect.


2 Answers 2


solutions is: OpenConnect Plugin

See here: https://wiki.jenkins.io/display/JENKINS/OpenConnect+Plugin

OR also you can use below method:

On Linux (Debian based)

sudo apt-get install openconnect

Add the following lines to the bottom of /etc/sudoers (ubuntu configuration)

jenkins ALL=NOPASSWD:/usr/sbin/openconnect*
jenkins ALL=NOPASSWD:/bin/kill*

Then you will get an option in the Jenkins run task called:

Connect to Cisco AnyConnect VPN
  • It seems the OpenConnect Plugin was removed from Jenkins's plugin repository. Commented May 31, 2019 at 10:33

Using Jenkins to create its own network paths is either clever or crazy. Right now I am leaning toward crazy, and trying to justify this reaction.

VPNs, particularly AnyConnect types, are normally maintained as infrastructure by network engineers and used for multiple uses. But it sounds like you want to deploy from inside your network to inside a customer network. Attaching a physical VPN between you is heavy-handed and likely to run into corporate road-blocks - if I've understood you correctly. Thinking of your problem as IoT causes me to suggest that you have your inside-customer device call up to the Cloud and pull down deployments, which you have staged in the Cloud. If your customer will give you an ingress port ( ours don't very often) you can have a two-way connection where the Cloud server pushes to the IoT device. But pull-only works well.

You can establish a VPN from your IoT device to the Cloud, and in fact, most today would demand that this connection be encrypted in some way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.