How to start a VPN connection using Jenkins?
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