snippetMinor
How to start a VPN connection using Jenkins?
Viewed 0 times
vpnhowjenkinsusingstartconnection
Problem
I'm on a Windows Server and I want to have a pipeline project on Jenkins that basically does this:
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.
- 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.
Solution
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)
Add the following lines to the bottom of /etc/sudoers (ubuntu configuration)
Then you will get an option in the Jenkins run task called:
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 openconnectAdd 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 VPNCode Snippets
sudo apt-get install openconnectjenkins ALL=NOPASSWD:/usr/sbin/openconnect*
jenkins ALL=NOPASSWD:/bin/kill*Connect to Cisco AnyConnect VPNContext
StackExchange DevOps Q#3284, answer score: 2
Revisions (0)
No revisions yet.