Bitbucket Pipelines Advanced Configuration Options | Bitbucket Blitz | Atlassian
Quick Overview
Bitbucket Pipelines advanced configuration in this video focuses on four key areas: Step resource allocation using the size parameter (e.g., 4x or 2x) to optimize compute resources and cost, Variable sharing between pipeline steps using output-variables, Conditional execution via the condition parameter to control step execution based on variable values, and Step failure strategies allowing options like retry or ignore failures for specific steps.
Key Points: Step resource allocation allows users to specify a size parameter (e.g., 4x, 2x, or 1x default) for steps to minimize cost and maximize performance by allocating the correct compute amount. Variable sharing between pipeline steps is achieved using the output-variables block in one step to define a variable and then accessing it in subsequent steps via the BITBUCKETSTEPOUTPUTVARIABLENAME environment variable. Conditional execution enables steps to run only when certain criteria are met, demonstrated by checking if an output variable (VAR1) equals 5 to execute a step, or equals 3 to skip another. Step failure strategies allow granular control over what happens when a step fails, including setting the strategy to 'fail' (default), 'retry' (up to five times for flaky tests), or 'ignore' (allowing the pipeline to continue). The example pipeline structure includes steps for building, creating variables, conditional execution based on the created variable, running good tests (which pass), running bad tests (which fail but are ignored), and running flaky tests (which are retried until they pass).
Context: This Bitbucket Blitz video provides a deep dive into advanced configuration options for Bitbucket Pipelines, moving beyond basic definitions to cover features that give developers more control over pipeline execution, resource usage, and fault tolerance. The presenter walks through a sample bitbucket-pipelines.yml file within the Bitbucket interface to demonstrate how to implement resource sizing, cross-step variable passing, runtime conditional logic, and specific failure handling mechanisms.