Bamboo — Continuous Delivery In Action

This contains five stages

  • Packaging
  • Deploy to QA
  • Run tests on QA
  • Deploy to production
  • Production smoke test

Each stage is divided into jobs and jobs are comprised of sub-steps or tests.

Step 1) This contains unit test, packages of projects. It needs to execute in isolation, so this

job gets its own stage. Here we go to the tasks. Inside the jobs, there are two tests that happen in sequence. Here we pull down a source code then invoke maven to run the unit test and package the code. The result is WAR file, and can be viewed by clicking artifacts. Here we create definition and can flag it as a shared artifact so that we can pass it downstream. Next we deploy the WAR to a testing environment. Again, this job cannot be done simultaneously with any of the other, so it gets it’s own stage too.

Stage 2) Here we use the Heroku deploy task to send the build to a Heroku app where we can test it. We create dependency by selecting artifact and telling Bamboo where in deploy job is working directory to place it.

Step 3) With the build deploy its time to test. Here job can run parallel so long enough build agents are available. We break our tests into batches and can run each batch as it’s own job. This can be done in various ways, which we can see in tasks under maven 3.x configuration. Even the UI level test can take place here. All jobs must complete successfully before moving on to the next stage.

Stage 4) Here we configure our stage and since we don’t want to deploy each single successful build so we add a checkpoint to make this a manually triggered or controlled stage. Each time a plan runs a build will pause here even if the previous stages were successful.

Stage 5) Following the production deploy we go to the automatic execution and run some smoke test. This is configured in the same way in maven 3.x configuration with different test groups and two parallel running jobs. Now that the pipeline is in place, we change code and see it in action. We commit the change after making change in the code and push it to the repository. In a few moments Bamboo detected the change and brings our pipeline to life. Here we have three build agents available but because of stages the job still keeps running eventually. Once the testing stage begins, we see our three agents working and we click on the resume button for stage 4 and select it from run menu.

Our changes are tested and our application is alive!