Running Gradle build using bamboo.

Rohit Sharma January 14, 2014

Our android app is being build using Gradle. I'm currently evaluating Bamboo for this project. Jenkins does have plugin to run Gradle build. However, I'm not sure if Bamboo run Gradle build. One of the question on Atlassian answers that it is available but it is on demand.

https://answers.atlassian.com/questions/176820/gradle-support-for-bamboo

What is the status of this support ? Is it still on demand ? Does this on demand plugin support all Gradle to the fullest ?

11 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

5 votes
Malte Hübner December 17, 2014

I am also very interested in a gradle integration. Currently I have to use the scripting features in combination with the gradle wrapper. (a graddle (wrapper) task would be nice).

4 votes
Oliver Hagel-Doll August 11, 2015

Quick Setup Guide


Use this script (e.g. for Gradle 2.5):

mkdir -p ~/mnt/bamboo-ebs/gradle && cd $_

wget https://services.gradle.org/distributions/gradle-2.5-bin.zip

unzip gradle-2.5-bin.zip

Then take a new snapshot from the EBS volume and use this in your elastic agent.

Afterwards add "Executable Capability" to your image configuration with this as path:

/mnt/bamboo-ebs/gradle/bin/gradle

Now you can use Gradle as Command in Build plans and add the task name as argument - e.g. "build".

shubham patni March 3, 2016

Oliver, not sure how your solution work, can you please describe with reference of following issue.

I install an trial version of Bamboo and setup rest of work include path of Git-Repo and all. Now issue is my Android Project used Gradle as build system but there is no direct support in Bamboo for this. Then what I need to add in "Script configuration" to make it happened.

Any suggestion here !

shubham patni March 4, 2016

Oliver, adding to chmod +x gradlew as script file worked for successful build. But that is not generating any output build (.apk in Android case). Any Suggestion !!

3 votes
dustin_barnes January 16, 2014

You can use the gradle wrapper (./gradlew) to execute gradle. I'm doing the same thing :)

Be aware that the documentation is catastrophically wrong with Bamboo >= 5.0. There are all kinds of bugs and missing features that I'm sorting out. One of them is that the Bash property export doesn't function at all.

2 votes
Dimitri January 11, 2016

Any updates on Gradle <> Bamboo integration?? We are really looking forward to it!!

1 vote
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 14, 2014

Groovy Task for Bamboo has Gradle and Gradle wrapper tasks. Not currently available for OnDemand however.

1 vote
Gretchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 14, 2014

For what it's worth...we build with gradle daily for one of our projects (one of the larger projects we have) but use a script to execute the build. We have a gradleprojectbuild.cmd script which we call from bamboo. We weren't able to get the plugin to work with this project (but then this project may not be typical so don't blame the plugin). We are using the download version of bamboo, but the build script is hosted in our repository and accessible with the rest of the source within the plan build workspace.

If you can build it from the command line you can likely build it with bamboo.

Benjamin Paz August 17, 2017

@GretchenRunning gradle with command script is interesting to me. I like your comment that "if you can build it from the command line you can likely build it with bamboo".  I want to run just plain-vanilla gradle tasks without a plugin. I script is fine. Can you share the basic script?  

Gretchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 23, 2017

See Gary Hellman's post below.  Using the gradle wrapper is pretty much how the teams I mentioned are doing this.

Like Murali Krishna likes this
0 votes
Adil Hussain July 31, 2017

I'm using the Artifactory for Bamboo Plugin for running Gradle Tasks in my Bamboo Jobs and I've not had any problems with it. It's got a simple checkbox for the Bamboo Jobs to use the Gradle Wrapper bundled into the project rather than the Gradle version installed on the build machine.

There's also the Groovy Tasks for Bamboo Plugin but I've not used that one.

0 votes
Gary Hellman May 12, 2016

One way to use gradle in bamboo - use the gradlew wrapper. (as Dustin Barnes mentions above)

Use a script plugin - The script (after checking out source code) might be "./gradlew clean build"  (or gradlew.bat)

One tricky thing is to make sure the "gradle/wrapper/gradle-wrapper.jar" file is forced to be checked in

(e.g., "git add -f gradle/wrapper/gradle-wrapper.jar") and checkin ".gradle/*" v2.13 perhaps

Also - I checked that the build worked on a laptop first - whatever your environment is ...

0 votes
shubham patni March 4, 2016

Rohit, checked with this thread. I added this as Script and this help me to build successful. But not generating any build output (.apk in case of Android). Let me know if you got any success here !!

0 votes
sarojani October 25, 2015

I really want to implement gradle with Bamboo, I want to know what needs to be done to do this.

0 votes
Malte Hübner September 23, 2015

Any updates on this? I would love to see a gradle integration for bamboo.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events