Hi all.
I'm a long time JIRA user. I've started a new job, and we decided to get JIRA, Bamboo and Bitbucket, for a fully integrated experience.
JIRA and Bitbucket are all configured nicely, and working perfectly.
Bamboo is a different matter. I've fallen at the (almost) first hurdle.
We've decided to try building in Docker, so we've created our own Docker image, based on the Atlassian Docker Agent image, with the addition of Maven and Ant. This has been pushed to a Docker repos in the Bamboo machine. Docker is installed on the Bamboo machine, and all works as expected.
I've created a linked repository, and all is well.
When I try to build the plan which uses the Docker agent, it fails instantly as soon as it calls "mvn clean install", it returns with a result code 137, which could be anything between "no", and a memory error. It's not like it gets halfway through the build, it's an immediate failure.
simple 28-Apr-2021 19:34:15 Starting task 'Clean and Install' of type 'com.atlassian.bamboo.plugins.maven:task.builder.mvn3'
command 28-Apr-2021 19:34:15 Beginning to execute external process for build 'SIM Quality of Experience - SIMQOE Plan - Default Job #6 (SIMQOE-SP-JOB1-6)'\n ... running command line: \n/home/bamboo/atlassian-bamboo-7.2.1/temp/runInDocker2427305850259878450.sh /usr/share/maven/bin/mvn --batch-mode clean install\n ... in: /home/bamboo/atlassian-bamboo-7.2.1/temp\n
simple 28-Apr-2021 19:34:17 Failing task since return code of [/home/bamboo/atlassian-bamboo-7.2.1/temp/runInDocker2427305850259878450.sh /usr/share/maven/bin/mvn --batch-mode clean install] was 137 while expected 0
simple 28-Apr-2021 19:34:17 Finished task 'Clean and Install' with result: Failed
- I've tried setting the MAVEN_OPTS to tweak the memory options, all the way from 128M up to 1Gb.
- I've created a new plan, which runs on the bare Bamboo server (had to install maven on it), and it "works". It fails to build, but that's a different matter. Maven starts up, does its thing, then fails. I don't mind about that.
- I've modified the maven target, removing "clean install", replacing it with "-version". It returns Maven 3.6.3, running in JDK 1.8.0_292, so maven is there, the JDK is correct, installed and functional.
- I've taken the docker image, manually started it on my Windows PC, sharing a volume, pointing my repos at /mnt/test, ssh'd into it, and run "mvn clean install" in /mnt/test, and it builds correctly (better than on the Docker box itself)
- I've taken the docker image on the Bamboo server, manually started it, copying the repos files to my home dir, sharing that as /mnt/test, and running mvn clean install. It builds correctly too
It only fails when calling maven in docker, from Bamboo. The only substantive difference is
/home/bamboo/atlassian-bamboo-7.2.1/temp/runInDocker2427305850259878450.sh
which calls maven.
Because it fails so quickly, it tidies up the files, and deletes the temp file, so I don't know what's going on.
Have I missed anything?
Thanks.
Pete.