Bitbucket is getting a new navigation

We’re rolling out these changes, so the documentation may not match your experience in the Bitbucket Cloud app. Read about the new Bitbucket navigation

プロキシを使用するようにランナーを設定する

このサポート ドキュメントは Linux Docker ランナーにのみ適用されます。シェル ランナー (macOS、Windows、Linux Shell) の場合、プロキシはランナーのホストで設定する必要があります。

自分またはその組織のシステムとワークフローのセットアップ方法によっては、セルフホスト ランナーをプロキシ サーバーの背後で実行できるようにする必要がある場合があります。HTTP_PROXYHTTPS_PROXY の各環境変数を Docker run コマンドに渡すことで、プロキシの背後で実行されるようにランナーを設定できます。

ランナーは git clone と内部で行う REST API 呼び出しに対して https 経由で Bitbucket と通信するため、少なくとも HTTPS_PROXY を設定する必要があります。

以下の例は、Linux でプロキシの背後でランナーを起動する方法を示しています。

docker container run \ -e HTTP_PROXY="http://my-http-proxy" \ -e HTTPS_PROXY="http://my-https-proxy" \ .... docker-public.packages.atlassian.com/sox/atlassian/bitbucket-pipelines-runner

プロキシを使用するようにホストの Docker デーモンを設定する

When using Docker, it may be necessary to also configure the Docker daemon on your runner host to also communicate to the outside world using a proxy. See the Docker documentation for details on how to set this up.

プロキシを使用するように Docker サービスを設定する

ビルドで Docker サービスを使用する際、初期設定ではランナーに渡された HTTP_PROXYHTTPS_PROXY の各変数が使用されます。

It is possible to configure the Docker service to use a proxy independently, or with a different proxy than what the Runner uses. This can be done by providing values for HTTP_PROXY and HTTPS_PROXY as workspace or repository variables, or by using a custom Docker-in-Docker service:

services: docker: image: docker:dind environment: HTTP_PROXY: "http://username:password@proxy2.domain.com" HTTPS_PROXY: "http://username:password@proxy2.domain.com"

制限事項

  • HTTP_PROXY and HTTPS_PROXY variables passed to the runner on start up are not passed through to the build container, service containers, or pipes. You can configure variables, such as repository level variables, if required.

  • Pushing back using git + http without configuring authentication is not supported. To push back over https, you will need to manually configure git to use a proxy as well as configure git to use appropriate credentials, or push back over ssh.

  • Docker サービスの場合は、ワークスペース、リポジトリ、またはサービスのレベルで設定された HTTP_PROXY または HTTPS_PROXY の各パイプライン変数は、ランナーに渡される変数をオーバーライドします。

  • 認証を必要とするプロキシはサポート対象外です。

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。