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,456,673
Community Members
 
Community Events
176
Community Groups

Configuring Docker agent in YAML Bamboo specs

Hi,

I'm migrating a build from using Jenkins with a Jenkinsfile to Bamboo. I'm looking to use the YAML version of configuring as opposed to Java. I would like to run my tasks in Docker agents as I was doing previously, but I can't work out, if it's even possible, how to pass arguments.

This is what I have currently in Jenkins which I'm looking to replicate:

 agent { docker { image 'node:9.11-alpine' args '-v $HOME/.m2:/root/.m2 -e HTTPS_PROXY -e HTTP_PROXY -e NO_PROXY' } }

I can specify the image in my bamboo.yaml very simply using the following on my job:

dockerImage: node:9.11-alpine

This doesn't get me all the way, as I'm not able to pass through the shared volume for the Maven cache, and more importantly the proxy variables from the host.

Is what I'm doing even possible? If not, is there a workaround? If not, is this on the roadmap for features to be added?

Cheers,

Nathan

2 answers

1 vote
Robert W Atlassian Team Jun 20, 2018

Nathan,

 

At this time it is not possible to pass anything other than just the dockerImage for use in Docker Runner using YAML specs.

 

If you need more control over the arguments passed to the Docker container, I suggest you try out Java Specs instead.  Java specs allows for much more complexity in the build definitions.

Docker Volumes: Bamboo Java Specs

 

Cheers, Robert Watson Dev Tools Support | Atlassian

Hi Robert, thanks for the reply. That's a shame as I'd much prefer to use YAML and avoid people creating crazy things in build pipelines.

Is there any plans in the roadmap to add this functionality to the YAML specs?

Robert W Atlassian Team Jun 20, 2018

Nathan,

I don't know if this functionality is currently on the roadmap or not.

I have, however, created a feature request for this capability here:

BAM-19952: Pass arguments to Docker Runner with YAML specs

Please be sure to watch it, and vote on it, so that you're notified if this is implemented in a future release. For your reference, you can find our policy on how we prioritize feature and improvement requests at this page. You can also add a comment to the feature request to explain your specific use-case to the developers.

I have also added a link to this post so that the developers can reference it if necessary.

Thank you, Robert Watson Dev Tools Support | Atlassian 

Hi Robert,

I've just been looking through the documentation for the Java Specs and the corresponding API documentation here.

It does cover the volume creation for the Maven cache. This is nice thanks.

Unfortunately it does not resolve my principal problem which is to pass through build arguments, in my case proxy configuration. It's set on my host agent, but without being passed through I'm unable to build things that aren't able to be proxied through our Nexus server.

Can you think of any workarounds for getting this context to the build agent? 

Cheers,

Nathan

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events