Bamboo Specs as Code: Moving Plan Config Out of the UI
Moving Bamboo plan configuration out of the UI into version-controlled Bamboo Specs reduces drift across environments and brings build changes into code review. This covers the practical decision of using YAML Specs, a worked example, and key trade-offs.
02 Nov 2025, 08:46 UTC

When you have a dozen microservices and a Bamboo UI that is the only source of truth for build plans, drift is inevitable. One team adds a test stage in production, another forgets to copy a repository trigger to staging, and the person who clicked the change is on vacation. The useful takeaway is not "use Bamboo Specs" in the abstract, it is to treat build plans like application code: versioned, reviewed, and reproducible across Bamboo instances.
The click-ops problem in multi-environment Bamboo
Bamboo plans define checkout, stages, jobs, artifacts, triggers and permissions. In the UI those are stored in Bamboo's database. That works for a single team, but it breaks down when the same logical pipeline must exist in dev, test and production Bamboo instances.
Without a single definition, you get manual copy-paste between environments, undocumented UI tweaks, and no history that ties a plan change to a pull request. Rollback means remembering who changed what and re-clicking it.
Plan-as-code with Bamboo Specs
Bamboo Specs is Atlassian's plan-as-code capability. Plans are described in a spec file and Bamboo creates or updates them from that file.
There are two forms. Java Specs are compiled against the Bamboo Specs API and published to the server. YAML Specs are repository-stored specs: a YAML file checked into the source repository, typically under a folder like bamboo-specs/. Bamboo scans the linked repository and applies the spec on changes.
The engineering decision is about coupling and review. Repository-stored YAML specs let the pipeline definition live next to the code it builds, so a change to stages, triggers or artifact publishing goes through the same code review and history as the application. The same spec can be used to create or update plans across multiple Bamboo instances, reducing drift.
YAML vs Java coverage
YAML Specs are readable and easy for teams to own, but they do not expose every plan capability that the UI or Java Specs do. Complex triggers, certain deployment features and advanced permissions may be missing. Verify the specific constructs you need against the Bamboo Specs reference for the Bamboo version you run before committing to YAML.
A concrete YAML spec for a multi-stage build
The following is an illustrative spec, not a tested deployment. It shows the shape of a repository-stored spec for a service with checkout, test, package and artifact publish.
# bamboo-specs/service-plan.yml
version: 2
plan:
project-key: SVC
key: API
name: Service API Build
description: Multi-stage build for Service API
stages:
- Build:
jobs:
- Test:
tasks:
- script: ./mvnw -B test
- Package:
tasks:
- script: ./mvnw -B package -DskipTests
artifacts:
- name: jar
location: target/*.jar
shared: true
triggers:
- repository:
branch: main
Place the file in the repository linked to Bamboo, for example bamboo-specs/service-plan.yml. In Bamboo, link the repository to a plan configuration and enable Specs scanning. On the next commit, Bamboo reads the spec and creates or updates the plan to match. Expected checks are the plan appearing under the project key and stages reflecting the file. Risk: an incorrect spec can delete or modify jobs on apply, so test in a non-production instance first.
Trade-offs and limitations to plan for
Feature gaps are the primary limitation. If you rely on a UI-only capability, YAML Specs may not represent it. Java Specs historically expose more capabilities at the cost of compile and publish overhead.
Security coupling matters. Repository-stored specs can be restricted so that arbitrary repo commits cannot reconfigure plans. If specs live in a developer-writable repository and specs security is not enabled, a pull request could alter production build plans. Enable specs permissions and separate spec repositories for production plans where appropriate.
Platform context also matters. Bamboo is Data Center oriented and Atlassian has ended new Server licenses with a steer toward Data Center. Confirm current licensing and support status on Atlassian's official channels before adopting at scale, as product status changes over time.
A practical way to check the result is to create a minimal YAML spec in a test repository, link it to a test Bamboo instance, and confirm the plan is created and updates on commit. Then compare the feature matrix for your required triggers and deployment steps against the official Bamboo Specs reference for your version.
Start with a single non-critical service, keep specs readable, and treat plan changes as code reviews. That gives you history, reproducibility and a safer path to promote pipelines across environments without relying on UI memory.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.