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:
To follow this post, you need the following software and accounts:
To install Bamboo:
C:\Users\Username\Documents
(note that setting it to the default location of C:\Program files may result in permission errors)Bamboo-home
After the install finishes, run the Bamboo server:
bin\start-bamboo.bat
http://localhost:8085/
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 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:
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.
This post uses the Octopus underwater app.
To use this repository:
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:
Docker
Build a Docker Image
[Your DockerHub Username]/[The tag of your image]
Now, add the Push Docker task:
Docker
Push a Docker Image
[Your DockerHub Username]/[The tag of your image]
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.
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:
docker pull [Your DockerHub Username]/[The tag of your image]
docker run -p 8080:8080 [Your DockerHub Username]/[The tag of your image]
http://localhost:8080/
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