Pipelines をさまざまなソフトウェア言語で使用する

Bitbucket Pipelines は、Docker イメージを使用して Linux 上に構築可能なあらゆる言語のプロジェクトに使用できます。Pipelines で使用する既定の Docker イメージは、このページに記載されているさまざまな言語をサポートしています。

また、以下の作業をすぐ開始できるよう、デモ リポジトリを含むそれぞれのページを用意しました。

Bitbucket Pipelines でデータベースを使用してテストする」も参照してください。

Bitbucket Pipelines で問題があった場合、コミュニティをご利用いただけます。

Clojure 

bitbucket-pipelines.yml

1 2 3 4 5 6 7 8 9 10 # This is a sample build configuration for Clojure. # Only use spaces to indent your .yml configuration. # ----- # You can use any Docker image from Docker Hub, or your own container registry, as your build environment. image: clojure:lein-2.7.1 pipelines: default: - step: script: # Modify the commands below to build your repository. - lein test

また、Docker Hub にある使用可能な Clojure イメージもご確認ください。

C++ - Make

bitbucket-pipelines.yml

1 2 3 4 5 6 7 8 9 10 11 12 # This is a sample build configuration for C++ – Make. # Only use spaces to indent your .yml configuration. # ----- # You can use any Docker image from Docker Hub, or your own container registry, as your build environment. image: gcc:6.1 pipelines: default: - step: script: # Modify the commands below to build your repository. - ./configure - make - make test

Docker

完全なガイド「Bitbucket Pipelines で Docker コマンドを実行する」を参照してください。

bitbucket-pipelines.yml

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 # This is a sample build configuration for Docker. # Only use spaces to indent your .yml configuration. # ----- # You can specify a custom docker image from Docker Hub as your build environment. # image: atlassian/default-image:latest # enable Docker for your repository options: docker: true pipelines: default: - step: script: # Modify the commands below to build your repository. # Set $DOCKER_HUB_USERNAME and $DOCKER_HUB_PASSWORD as environment variables in repository settings - export IMAGE_NAME=your-Dockerhub-account/your-docker-image-name:$BITBUCKET_COMMIT # build the Docker image (this will use the Dockerfile in the root of the repo) - docker build -t $IMAGE_NAME . # authenticate with the Docker Hub registry - docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD # push the new Docker image to the Docker registry - docker push $IMAGE_NAME

Go

bitbucket-pipelines.yml

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 # This is a sample build configuration for Go. # Only use spaces to indent your .yml configuration. # ----- # You can use any Docker image from Docker Hub, or your own container registry, as your build environment. image: golang:1.7 pipelines: default: - step: script: # Modify the commands below to build your repository. - PACKAGE_PATH="${GOPATH}/src/bitbucket.org/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}" - mkdir -pv "${PACKAGE_PATH}" - tar -cO --exclude-vcs --exclude=bitbucket-pipelines.yml . | tar -xv -C "${PACKAGE_PATH}" - cd "${PACKAGE_PATH}" - go get -v - go build -v - go test -v

Haskell

bitbucket-pipelines.yml

1 2 3 4 5 6 7 8 9 10 # This is a sample build configuration for Haskell. # Only use spaces to indent your .yml configuration. # ----- # You can use any Docker image from Docker Hub, or your own container registry, as your build environment. image: haskell:7.10 pipelines: default: - step: script: # Modify the commands below to build your repository. - stack test

また、Docker Hub にある使用可能な Haskel イメージもご確認ください。

java

完全なガイド「Bitbucket Pipelines での Java の使用方法」を参照してください。

Javascript (Node.js)

完全なガイド「Bitbucket Pipelines での Javascript (Node.js) の使用方法」を参照してください。

.NET Core

bitbucket-pipelines.yml

1 2 3 4 5 6 7 8 9 10 11 12 13 14 # This is a sample build configuration for .NET Core. # Only use spaces to indent your .yml configuration. # ----- # You can use any Docker image from Docker Hub, or your own container registry, as your build environment. image: microsoft/dotnet:sdk pipelines: default: - step: script: # Modify the commands below to build your repository. - export PROJECT_NAME=yourProjectName - export TEST_NAME=yourTestName - dotnet restore - dotnet build $PROJECT_NAME - dotnet test $TEST_NAME

PHP / Laravel

完全なガイドを参照してください。

python

完全なガイドである「Bitbucket Pipelines での Python の使用方法」を参照してください。

ruby

完全なガイドである「Bitbucket Pipelines での Ruby の使用方法」を参照してください。

Rust

bitbucket-pipelines.yml

1 2 3 4 5 6 7 8 9 10 11 12 # This is a sample build configuration for Rust. # Only use spaces to indent your .yml configuration. # ----- # You can use any Docker Hub image, or your own container registry, as your build environment. image: rust:1.31 pipelines: default: - step: script: # Modify the commands below to build your repository. - cargo build -v - cargo test -v

scala

bitbucket-pipelines.yml

1 2 3 4 5 6 7 8 9 10 11 # This is a sample build configuration for Scala. # Only use spaces to indent your .yml configuration. # ----- # You can use any Docker image from Docker Hub, or your own container registry, as your build environment. image: bitbucketpipelines/scala-sbt:scala-2.12 pipelines: default: - step: script: # Modify the commands below to build your repository. - sbt test

その他のサポート対象言語

Docker イメージを使用して、Linux上に構築可能なあらゆり言語をビルドすることができます。

他の言語でプロジェクトをビルドする際、Docker Hub の次のような Docker イメージを使用できます。

その他のヘルプ