Bitbucket Pipelines empowers modern teams to build, test and deploy their code directly within Bitbucket. Today, we’re excited to share a huge improvement to how Pipelines can be structured to suit your team’s workflow, with support for multiple steps – the highest voted feature request in Bitbucket Pipelines.
With multiple steps in Pipelines, you can now:
- Structure and visualize your pipeline in a more logical manner.
- Test your code against different build environments.
- Separate your deployment step from other commands in your pipeline.
You can add additional steps to your pipeline by modifying your bitbucket-pipelines.yml file to include another step keyword. Steps are executed in the order that they appear in the bitbucket-pipelines.yml file, and run in separate Docker containers. Each step can be configured to:
- Use a different Docker image.
- Use specific caches and services.
- Produce artifacts that subsequent steps can consume.
Below is an example bitbucket-pipelines.yml file which uses multiple steps.
name: Build and test
- npm install
- npm test
- npm build
name: Integration test
- npm run integration-test
name: Deploy to beanstalk
- python deploy-to-beanstalk.py
For more information on how to set up multiple steps, check out our documentation.
Now that we’ve added support for multiple steps, you might be curious about whether we’ll support running steps in parallel or manually on-demand. Good news! This work is a stepping stone for us to add support for manual steps and parallel steps in the near future.
So stay tuned for more improvements to Bitbucket Pipelines to meet the needs of your team. If you haven’t tried Pipelines, get started today and improve the way your development team works.
The post Add structure to your pipeline with multiple steps in Bitbucket Pipelines appeared first on Bitbucket.