Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,459,537
Community Members
 
Community Events
176
Community Groups

BitBucket Pipelines and OpenVPN

Has anyone managed to get an OpenVPN client working within pipeline docker containers?

We have built our own image and tested locally and it works fine with docker command line option --cap-add=NET_ADMIN however it doesn't work within the BitBucket Cloud service as their docker containers don't seem to enable this option.

Any advice or alternate solutions much appreciated.

9 answers

Stuart,

Any success with this method? We're in the same boat.

2 votes

Hi Stuart,

Instead of using Service containers for OpenVPN clients, you can run your own docker containers manually in your build with the necessary CLI options.

pipelines:
default:
- step:
services:
- docker
script:
- docker run --cap-add=NET_ADMIN your-image:tag

Docker run docs: https://confluence.atlassian.com/bitbucket/run-docker-commands-in-bitbucket-pipelines-879254331.html

Please keep in mind that we have some security restrictions that will be applied, so you may be unable to attain all the necessary capabilities to still successfully run OpenVPN. If it's problematic, I'm unsure if there's any workarounds in Pipelines I can suggest. But see how you go. :)

Thanks,

Phil

Hi Phillip,

thanks a lot for the answer.

However it does not work like that, I just get an error "docker: Error response from daemon: authorization denied by plugin pipelines: --cap-add is not allowed."

Is there any other ways to connect to secured network from BB Pipeline?

Hi @Oleg Sigida 

Indeed. We don't allow any cap-add flags anymore for security reasons.

The only feedback I can offer is to follow this ticket: https://bitbucket.org/site/master/issues/12753/allow-customers-to-connect-the-pipelines

We'd like to explore this feature, but have received limited feedback at the moment. If you have time, can you fill out this survey? https://docs.google.com/forms/d/e/1FAIpQLSdzEBor1vVSxopOnLnTheJ_QoozXqn5i1JIL9KQW-h6g1wkaQ/viewform

Thanks,

Phil

Like Daniel Santos likes this

thanks! will have a look what options are possible

And the form is done

Having the same issue here.  Did you ever figure out a way to get pipelines to connect to a server behind a VPN?

Hi Michael,

We have an open feature request for VPN support here. I suggest you follow the ticket here for updates: https://bitbucket.org/site/master/issues/12753/allow-customers-to-connect-the-pipelines

Thanks,

Phil

Thanks @Philip Hodder
I'm now watching it.

I managed to find another solution for our needs using AWS CodeDeploy. Unfortunately they do not have an easy integration with bitbucket (only GitHub).

I tried to configure wireguard and hit this problem. It seems like you have to use your own runners to be able to do this.

Brrrr, need gloves and a scarf, so cold in here. Looking for this too. We have local embedded devices that we want to run integration tests with from the bitbucket pipelines, which are available through our own openvpn server.

it's cold here...

Another bump here, i'm looking to run lighthouse within a container where this flag is used. Is there any progress or has anyone found workarounds?

any success ?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events