Continuous Integration (CI) servers are an important part of the CI/CD process. CI servers take a code repository, build it, and push it to a central location where a Continuous Delivery (CD) tool like Octopus can take over and manage deployments.

Bamboo is a CI server developed by Atlassian that automates the building and testing of software applications. If you're beginning your CI/CD journey, it's helpful to begin with a simple use case, with a visible result.

In this post, I show you how to build and push a software artifact where Octopus can take over and deploy it to a target environment.

You learn how to:

Getting set up

To follow this post, you need the following software and accounts:

Installing Bamboo on a Windows server

To install Bamboo:

After the install finishes, run the Bamboo server:

Setting up users

In the start-up screen, you're asked to set up an admin account. Fill out the details and store the details in a password manager. If you misplace your password, you need to run through a recovery process.

Agents

Agents are the Workers that execute workloads in Bamboo. Because you installed the pre-requisite technology, you can use the local machine as an agent for testing purposes.

To set up a local agent:

Setting up the project and plan

Bamboo organizes your workflow into projects and plans. A project can contain multiple plans and each plan is a process that executes a series of tasks.

To get started, set up your first project and plan:

On the next screen, check the box that says Link new repository.

Connect to the Octopus underwater app repository

This post uses the Octopus underwater app.

To use this repository:

Configuring the job

On the Configure Job screen, configure the tasks that the plan runs to execute your job. Bamboo provides a suite of task steps you can select from. These tasks execute a certain step in the CI pathway, such as checkout, build, pull, push.

There's a source code checkout task pre-filled for you. This checks out the linked GitHub repository into Bamboo.

First, add the Build Docker task:

Now, add the Push Docker task:

The plan starts to execute by checking out the code, building the Docker image, and pushing the built image to DockerHub

After it's complete, you see a green tick box to indicate the plan completed successfully.

Navigate to your DockerHub account to confirm the image has been pushed to the repository.

Deploy step

Now the image is on DockerHub, any CD tool can deploy it locally or to a cloud platform. We have guides explaining how to do this for:

To view the application locally:


Conclusion

CI servers are an important part of the CI/CD process, and you can use many different CI servers to complete your deployments. Bamboo by Atlassian lets you build and push Docker images to Docker repositories.

In this post, you learned how to install Bamboo and set up a project. This is a simple example to get started, but there are many more ways to use Bamboo.


Also Published Here