Managing CI/CD Drift with Bamboo Specs: Version-Controlled Pipelines
Bamboo Specs lets you define build plans as version-controlled YAML, giving you code review, branching, and rollback for CI/CD configuration. A minimal example shows how a simple Script task plan syncs automatically on commit.
10 Sept 2025, 21:16 UTC

The Problem: Configuration Drift in Bamboo
Teams using Atlassian Bamboo often manage build plans and deployment projects through the web UI. Over time, manual clicks create configuration drift: a plan on the main branch differs from a feature branch, a hotfix changes a script task without a record, and rolling back means guessing which checkboxes were toggled. This undermines reproducibility and makes audits painful.
Takeaway: Bamboo Specs moves plan definitions into version-controlled YAML (or JSON) files stored alongside your source code. When you commit a spec, Bamboo automatically validates and syncs the plan, giving you code review, branching, and rollback for your CI/CD configuration.
How Specs Works
Bamboo Specs is a module built into Bamboo Server 6.0 and later. You write a declarative YAML file that describes a plan (a sequence of stages, jobs, and tasks) or a deployment project (environments, releases, and permissions). The file lives in a repository that Bamboo is linked to — typically the same repo that contains the application code.
On every push, Bamboo scans the repository for a bamboo-specs/ directory (or a location you configure). It parses any .yml or .yaml files, validates them against the Specs schema, and creates or updates the corresponding plan in the Bamboo UI. No manual UI interaction is required after the initial repository link.
Worked Example: A Minimal Plan Spec
Create a file named bamboo-specs/ci-plan.yml in your repository:
version: 2
plan:
project-key: DEMO
key: CI
name: Continuous Integration
stages:
- Build:
jobs:
- Compile:
tasks:
- script:
interpreter: SHELL
scripts:
- echo "Building..."
- ./gradlew build
Where to run: Commit this file to the default branch of a repository that has been added to Bamboo under Specs > Repositories. You need write permission on the repo and Bamboo administrator rights to link the repository initially.
Expected check: After the push, open Bamboo and navigate to Specs > Repositories. The repository entry shows a green sync status and lists the plan DEMO-CI. Trigger a build manually or via webhook; the Compile job runs the two shell commands.
Risk: If the YAML is malformed or references a non‑existent project key, Bamboo reports a validation error in the same Specs UI and does not create the plan. The existing plan (if any) remains unchanged.
Branching and Rollback
Because the spec lives in Git, feature branches automatically get their own plan instances. When a developer opens a pull request, Bamboo creates a plan named DEMO-CI- that mirrors the main branch's configuration but runs against the branch's code. Merging the PR updates the main plan; deleting the branch removes the ephemeral plan.
Rollback is a standard Git operation: revert the commit that changed the spec, push, and Bamboo syncs the plan back to the previous version. You can verify by checking the plan's History tab in Bamboo — it shows the spec revision that produced each plan version.
Limitations to Plan For
- Minimum version: Bamboo Server 6.0 or Data Center 6.0. Older installations cannot use Specs at all.
- UI‑only features: Certain custom task configurations, legacy plugin UIs, and some permission settings cannot be expressed in YAML. You may need a hybrid approach — define the core pipeline in Specs and tweak the rest in the UI.
- Repository polling latency: Bamboo polls linked repositories on a configurable interval (default 60 seconds). For immediate feedback, configure a webhook from your Git host to Bamboo's
/rest/api/latest/specs/repository//scanendpoint.
Next Steps
- Upgrade to Bamboo 6.0+ if you haven't already.
- Link a test repository under Specs > Repositories and add the example YAML above.
- Observe the sync status, trigger a build, then revert the commit and confirm the plan reverts.
- Gradually migrate existing plans by exporting them via the Bamboo REST API (
GET /rest/api/latest/plan/{planKey}/spec) and committing the generated YAML.
Once the migration is complete, treat the bamboo-specs/ directory as the single source of truth for your CI/CD configuration — just like your application code.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.