OpenVPN inside travis


I am trying to configure travis to deploy my build artefacts to the server behind vpn. I am using openvpn config that I verified is working locally. I have installed latest version of openvpn inside my build environment. However, when the vpn process is started by sudo openvpn --config vpn-config.ovpn &>>openvpn-client.log & everything gets stuck. I have tried using debug mode but everything stucks there too.

My travis.yml file:

dist: xenial
language: go
- echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- sudo bash -c 'wget -O -|apt-key add -'
- sudo bash -c 'echo "deb xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list'
- sudo apt-get update
- sudo apt-get --allow-unauthenticated install openvpn
- openssl aes-256-cbc -K $encrypted_key -iv $encrypted_iv
  -in vpn-config.ovpn.enc -out vpn-config.ovpn -d
- sudo openvpn --config vpn-config.ovpn &>>openvpn-client.log &
install: true
- go build
- provider: script
  skip_cleanup: true
  script: bash
    tags: true
  - secure: ""
  - GO111MODULE=on

Is openvpn supported at all? I saw few issues in github mentioning that it’s not but nothing concrete.

Please run it without redirection to see if there are any errors.
Also please give a link to the build in question.

You may also want to examine the logs at your VPN server as the issue may be there.

I have ‘cat’ed’ the log file and there are no errors.

The build is private, so I am not sure wether I can give a link to it.

VPN logs of the server look ok.

AFAIK you can but only the support staff will be able to open it. You can try putting it into the reply form, logging out on, then trying to open the link in the reply preview.