Understanding Bamboo Architecture
Agents and Plans
Bamboo orchestrates builds using a master server and distributed build agents (local or remote). Plans define the steps and environments for building and testing code. Failures often arise when agents are misconfigured, offline, or overloaded.
Deployment Projects and Artifacts
Deployment projects pull artifacts from build plans and promote them through staged environments. Incomplete artifact sharing or environment-specific script failures lead to deployment blocking or drift.
Common Symptoms
- Build plans hanging or timing out with no logs
- Remote agents disconnecting or marked as “incompatible”
- Artifacts not available in deployment projects
- Java memory errors or thread exhaustion during large plan executions
- Test results not recorded or appearing partially in reports
Root Causes
1. Agent Capability Mismatches
If an agent does not have the required capabilities (JDK, tools, labels), jobs wait indefinitely in the queue. Dynamic capability misregistration can also result in jobs not being assigned.
2. Artifact Sharing Misconfiguration
Artifacts not properly defined or shared at the plan level will not be accessible in deployment environments, resulting in null files or failed steps.
3. Plugin or Script Compatibility Errors
Custom scripts or outdated Bamboo plugins can cause silent failures, especially during script tasks, test parsing, or artifact upload phases.
4. Memory or Thread Pool Exhaustion
Bamboo server or agent JVM settings may be undersized. High-concurrency pipelines consume threads and heap memory, causing GC thrashing or HTTP timeout errors.
5. Parallel Stage Flakiness in Test Execution
Running parallel tests without isolated environments or unique resource locking results in flaky or non-deterministic failures.
Diagnostics and Monitoring
1. Analyze Build Logs and Timestamps
Check build logs for hangs, missing output, or long silent periods. Enable verbose logging for specific tasks using -X
or --debug
flags in Maven or Gradle builds.
2. Monitor Agent Health
Use the Bamboo Admin → Agents view to see agent capabilities, logs, and errors. Confirm that agents are alive and responsive to server pings.
3. Review Server Resource Usage
Monitor JVM metrics via JMX or top
, jstat
, and GC logs. Watch for long GC pause times or high thread counts that indicate saturation.
4. Inspect Artifact Sharing Configuration
Ensure artifacts are marked as “shared” and correctly referenced in downstream tasks. Validate path correctness and build dependencies across stages.
5. Examine Test Result Parsers
Review the test parser configuration (e.g., JUnit, TestNG) and ensure output files are generated at expected paths. Mismatched patterns or file permissions may block results from showing.
Step-by-Step Fix Strategy
1. Align Agent Capabilities with Plan Requirements
Manually add or auto-detect agent capabilities. Use consistent labels or requirement rules for job routing to compatible agents.
2. Define and Share Artifacts Correctly
Declare artifacts at the plan level and mark them for sharing. In deployment projects, confirm matching artifact names and paths.
3. Upgrade or Isolate Problematic Plugins
Audit plugin compatibility with Bamboo and Java versions. Disable non-critical custom scripts and rerun builds to isolate faulty integrations.
4. Increase Heap and Thread Pool Limits
Edit bamboo.cfg.xml
or systemd service files to raise heap and thread pool settings. Apply GC tuning flags and validate using monitoring tools.
5. Stabilize Parallel Test Environments
Ensure parallel tests do not share file systems, ports, or data. Use containerization or pre-job hooks to create isolated environments per thread.
Best Practices
- Use deployment environments for artifact promotion rather than re-building
- Tag agents and define job requirements explicitly to avoid misrouting
- Configure log rotation and cleanup jobs to avoid disk saturation
- Version-lock plugins and integrations to prevent regression from updates
- Use Bamboo Specs in YAML or Java to version control CI/CD logic
Conclusion
Bamboo delivers flexible and robust CI/CD orchestration, but managing agent scalability, resource allocation, and artifact integrity is key to success in production workflows. With systematic diagnostics, proactive agent management, and clear deployment contracts, teams can reduce build failures and maintain fast, reliable pipelines using Bamboo.
FAQs
1. Why is my Bamboo build hanging without logs?
Usually due to agent unavailability or job capability mismatch. Check the job queue and agent logs for assignment delays.
2. How do I fix missing artifacts in deployments?
Ensure artifacts are shared and named consistently between build and deployment stages. Verify output paths and retention settings.
3. What causes Bamboo agents to disconnect?
Network issues, JVM crashes, or version mismatches. Restart the agent, verify Java versions, and inspect atlassian-bamboo.log
.
4. Why are test results not showing?
Check that test result files exist and match configured parser patterns. Confirm the test framework generates output during failed runs.
5. How can I improve Bamboo performance?
Allocate more memory to the server/agents, reduce concurrent build stages, clean up logs/artifacts regularly, and optimize JVM GC settings.