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

Pipelines のビルドで依存性を指定する

Bitbucket Pipelines は、ビルド環境を提供する Docker コンテナでビルドを実行します。コンテナ内でビルドに必要な依存関係を指定するには複数の方法がありますが、独自のコンテナ内で依存関係をサービスとして実行することをおすすめします。

なお、以下の説明もご覧ください:

If your dependencies can be run as services in their own Docker containers, you should define them as additional services in the 'definitions' section of the bitbucket-pipelines.yml file. These services can then be referenced in the configuration for a particular pipeline. This is the recommended approach for running databases, external caches, etc. See Use services and databases in Bitbucket Pipelines for details.

ビルド スクリプトを使用して依存関係をインストールする

An easy way to make dependencies available to your build is to install them using the build script in your bitbucket-pipelines.yml file. The exact method of installing dependencies will depend on the Docker image you're using for your build.

Debian または Ubuntu を基盤とする Docker イメージの場合、apt-get を使用してパッケージをインストールできます。

以下は、Debian を基盤とする Maven 3.3.9 Docker イメージで apt-get を使用して依存関係をインストールする方法の例です。

image: maven:3.3.9 pipelines: default: - step: script: # install deps - apt-get update && apt-get install -y imagemagick libjmagick6-java # build the Java app - mvn package

If you need to use the same dependencies in multiple steps, we recommend caching them to save download time.

You can check your bitbucket-pipelines.yml file with our online validator.

独自の Docker イメージ内で依存関係を提供する

This is described on Using Docker images as build environments, under Creating a custom build environment.

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

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