Use Pipelines in different software languages
You can use Bitbucket Pipelines for a project in any software language that can be built on Linux by using Docker images. Thedefault Docker image used by Pipelines has support for many of the languages mentioned on this page.
We've also built specific pages, including demo repositories, to help you get started with:
See also Test with databases in Bitbucket Pipelines.
Remember, if you're having trouble using Bitbucket Pipelines, our active community is always there to help.
Clojure
bitbucket-pipelines.yml
# 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.1pipelines: default: - step: script: # Modify the commands below to build your repository. - lein testSee also this Clojure image from Docker Hub that you can use.
C++ - Make
bitbucket-pipelines.yml
# 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.1pipelines: default: - step: script: # Modify the commands below to build your repository. - ./configure - make - make testDocker
See our full guide —Run Docker commands in Bitbucket Pipelines
bitbucket-pipelines.yml
# 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 repositoryoptions: docker: truepipelines: 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_NAMEGo
bitbucket-pipelines.yml
# 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.7pipelines: 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 -vHaskell
bitbucket-pipelines.yml
# 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.10pipelines: default: - step: script: # Modify the commands below to build your repository. - stack testSee also this Haskell image from Docker Hub that you can use.
Java
See our full guide — Java with Bitbucket Pipelines.
Javascript (Node.js)
See our full guide —Javascript (Node.js) with Bitbucket Pipelines.
.Net Core
bitbucket-pipelines.yml
# 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:sdkpipelines: 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_NAMEPHP / Laravel
See our full guides:
Python
See our full guide -Python with Bitbucket Pipelines.
Ruby
See our full guide - Ruby with Bitbucket Pipelines.
Rust
bitbucket-pipelines.yml
# 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.31pipelines: default: - step: script: # Modify the commands below to build your repository. - cargo build -v - cargo test -vScala
bitbucket-pipelines.yml
# 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.12pipelines: default: - step: script: # Modify the commands below to build your repository. - sbt testOther supported languages
You can build any language that can be built on Linux by using Docker images.
Here are some Docker images from Docker Hub that you can use to build projects in other languages:
Run Docker commands in Bitbucket Pipelines
Build a Docker image from a Dockerfile and to push it to a Docker registry by running Docker commands.
Javascript (Node.js) with Bitbucket Pipelines
Use Pipelines for building and testing a Node.js software project in a Docker container.
Java with Bitbucket Pipelines
Use Pipelines for building and testing a Java software project in a Docker container, using Maven or Gradle.
Laravel with Bitbucket Pipelines
Use Pipelines to build and test a Laravel project in a Docker container.
PHP with Bitbucket Pipelines
Use Pipelines for building and testing a PHP software project in a Docker container.
Python with Bitbucket Pipelines
Use Pipelines for building and testing a Python software project in a Docker container.
Ruby with Bitbucket Pipelines
Use Pipelines for building and testing a Ruby software project in a Docker container.
Was this helpful?
- Explore more
- Run Docker commands in Bitbucket Pipelines
- Javascript (Node.js) with Bitbucket Pipelines
- Java with Bitbucket Pipelines
- Laravel with Bitbucket Pipelines
- PHP with Bitbucket Pipelines
- Build, test, and deploy with Pipelines
- Get started with Bitbucket Pipelines
Use Pipelines in different software languages
- Use Docker images as build environments
- Expression language
- Access Pipelines deployment guides