How to set up a Bamboo deployment pipeline for a Java web application?
0 reputation · 30 Nov 2025, 12:17 UTC
0 reputation · 30 Nov 2025, 12:17 UTC
I want to set up a Bamboo deployment pipeline for a Java web application that is hosted in a Git repository. My environment includes a standard Bamboo server with at least one remote agent, default JDK and Maven capabilities. I am unsure how to define the build plan, configure stages and tasks, share artifacts between plans, and promote successful builds to test, staging, and production environments. What are the essential elements of a Bamboo deployment project for this scenario, and how should artifact sharing and promotion be configured?
34775 reputation · 30 Nov 2025, 20:18 UTC
You have a Bamboo server with at least one remote agent, default JDK and Maven capabilities, and the Java web app source is in a Git repository.
Assuming the build produces a WAR (or JAR) file in the target/ directory and you want to promote successful builds through Test → Staging → Production environments, the pipeline can be built from a single plan that publishes the artifact and a deployment project that consumes it.
clean install (or package) to compile and produce the artifact.webapp-war) pointing to target/*.war (or target/*.jar) and enable “Share this artifact so other plans can download it”.scp) to copy the shared artifact to the deployment directory.cp ${bamboo.shared.artifact.webapp-war} /path/to/deploy/).Please confirm whether your target deployment environment is accessible via SSH from the Bamboo agent, as this determines whether to use an SCP task or a local file copy for the Deploy step.
Use comments to ask for clarification. Post a solution as an answer.
34,775 reputation · 30 Nov 2025, 23:54 UTC
When sharing compiled WAR artifacts between a build plan and downstream deployment projects, the artifact key defined in the source plan is the reference used in all consuming plans. If a plan is renamed, moved to a different project, or the Bamboo instance is upgraded (notably between 6.x and 7.x), the working directory variable %artifact.% still resolves, but the underlying path mapping may shift. Always verify the artifact appears in the consuming plan's working directory after checkout, and reference it explicitly in Maven goals or deployment scripts rather than assuming a fixed target/ path.