Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,337
Community Members
 
Community Events
176
Community Groups

Process of using docker images in tasks

Hello,

Could anyone explain the process about HOW I can use docker with my tasks?

simple example: I have a maven 3.x task to build some code, I installed maven in the bamboo server and pointed the executable in bamboo. 

But HOW would I use the maven docker image to build the code without having to install maven in the bamboo server? 

I am looking for the how, not for articles that explain what bamboo and docker are.

thanks

2 answers

This is the solution:

- set up a build plan and under "Default Job" on tab "Docker" and there I added maven:3.6.1-ibmjava-8-alpine as "Docker image", left everything else as is and pressed the "Save" button.

 

- added "Maven_Docker" under Overview >> Executables setting path /usr/share/maven which determines the Maven 3.x path inside the above mentioned Docker container

 

- First Bamboo task of this build plan needs to be a Source Code Checkout task of a Java project that shall be utilized for a Maven build.

 

- As second task I added Bamboo task Maven3.x, set "Maven_Docker" as Executable on its task configuration page and "JDK 1.8" (which is set on my Bamboo instance as a Server Capability) as "Build JDK. All other settings are untouched. 

 

- Finally I run this build plan and it started loading the Docker container, built the Java project utilizing the Docker container's Maven 3.x executable and finished with success.

0 votes
jira guy Rising Star Sep 06, 2019

Use a docker container to run your instead of regular agent which runs on bamboo server. Make sure you docker container has maven and docker installed. 

Voila!

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events