We are using self hosted runners behind proxy.
Sometimes pipes need to connect to Internet. For example, "bitbucketpipelines/checkstyle-report" needs to report to http://api.bitbucket.org; "aquasecurity/trivy-pipe" needs to download database before scan images.
How can we setup HTTP_PROXY and HTTPS_PROXY for pipes?
Hello @Aaron.Luo ,
Thank you for reaching out to Atlassian Community!
At this moment, Pipelines Runners do not support using proxy, but we already have a feature request to implement that functionality, which you can find in the following link :
I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with this policy in mind.
As a workaround, you could try forcing the docker daemon to use proxy while starting the runner container by including the following configuration in `~/.docker/config.json` :
"proxies": { "default": { "httpProxy": "http://username:password@proxy2.domain.com", "httpsProxy": "http://username:password@proxy2.domain.com" } }
Source : https://docs.docker.com/network/proxy/
Hope that helps. Let us know in case you have further questions about this particular topic.
Thanks, @Aaron.Luo .
Kind regards,
Patrik S
Thanks @Patrik S for your response.
The workaround didn't work. I tried to include the proxy configuration in `~/.docker/config.json` in the docker daemon then tested bitbucketpipelines/git-secrets-scan:0.6.0 and bitbucketpipelines/checkstyle-report:0.3.1 pipes, both failed.
I looked through the source code of both pipes. Seems both pipes tried to go through the bitbucket-pipelines-auth-proxy container to connect to api.bitbucket.org. I don't know if it's possible to have HTTP_PROXY and HTTPS_PROXY configured upon the bitbucket-pipelines-auth-proxy container.
After checking internally, our development team confirmed that they still need to do some work before Runners behind a proxy is available.
In this case I would suggest you to keep a watch on the feature request BCLOUD-21158 to receive first-hand updates about any progress on the implementation.
Thank you, @Aaron.Luo .
Thanks @Patrik S . I've already commented under BCLOUD-21158. Will keep watching it.
It looks like you're new here. Sign in or register to get started.