Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- node {
- anyconnect = docker.image('anyconnect:1').run("--cap-add NET_ADMIN --cap-add SYS_ADMIN --device /dev/net/tun:/dev/net/tun -e VPN_USER=${env.USER} -e VPN_PASS=${env.PASS} --name anyconnect")
- sh 'echo "Startig anyconnect and setting route"'
- sh """
- IPADDRESS = $(docker inspect -f "{{ .NetworkSettings.IPAddress }}" anyconnect)
- echo $IPADDRESS
- ip route replace xx.xx.xx.xx. via $IPADDRESS
- """
- sh 'curl 10.29.12.14:22'
- anyconnect.stop()
- }
Add Comment
Please, Sign In to add comment