Can I create more than one Pipeline per Repo?

I would like to build and test my projects on several OS platforms using different docker images. What is the best way to achieve this with pipelines?

1 answer

0 votes

Hi Anton,

Bitbucket Pipelines allows you to define a Docker image to use on the step (as well as globally). The current limitation is that you will need to define a different Docker image on each branch (but in the future when there are multiple steps in a Pipeline you can have each step have a different Docker image).

For example:

image: my-global-image:version-1
 
pipelines:
  branches:
    branch-1:
      - step:
          image: ubuntu:16.04 # This will be used instead of my-global-image.
          script:
            - ./runTests
    branch-2:
      - step:
          image: ubuntu:14.04 # This will be used instead of my-global-image.
          script:
            - ./runTests

More information on configuring bitbucket-pipelines.yml and branches can be found here:

 https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html#Configurebitbucket-pipelines.yml-ci_imageimage(optional)

https://confluence.atlassian.com/bitbucket/branch-workflows-in-bitbucket-pipelines-856697482.html

In regards to your specific use-case of testing on several OS environments, keep in mind that Bitbucket Pipelines only supports Linux at the moment (this might limit what you were hoping to do).

Hope that helps. smile

Phil

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

638 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot