I have a stash repository and Bamboo to build. I have created a task that runs the build.xml. But I when i run the plan (build plan) I get this error which doesnt say much :

Failing task since return code of [/usr/dev/fx/builds/ant/apache-ant-1.7.1//bin/ant -Djava.io.tmpdir=/tmp/BERS-AMS-JOB1 -f build.xml deployEmptyCheckOnly -Dsfdc.username=mnimbal@cffc.com.dev......] was -1 while expected 0

What error is this?

  • Assuming deployEmptyCheckOnly is the name of the Ant target, what does that target do? – Keith C Dec 15 '14 at 23:02
  • <target name="deployEmptyCheckOnly"> <echo level="info">Testing the deploy</echo> <sf:deploy checkOnly="true" logType="Debugonly" username="${sfdc.username}" password="${sfdc.password}" serverurl="${sfdc.serverurl}" deployRoot="${basedir}/src" pollWaitMillis="${sfdc.pollWaitMillis}" maxPoll="${sfdc.maxPoll}" runAllTests="true" /> </target> – Manjunath Nimbal Dec 15 '14 at 23:12
  • 1
    I assume Bamboo is reporting the exit code of Ant and Ant is returning that exit code because sf:deploy is return a non-zero exit code. – Keith C Dec 15 '14 at 23:37
  • 1
    @ManjunathNimbal, it's a bit hard to tell what is going on but you will probably get better luck on the atlassian boards. That looks like a bamboo error rather than an error from the force.com migration tool. – Greg Grinberg Dec 16 '14 at 0:28
  • 1
    Do you have the "The build will produce test results" option checked in your Task? – cricketlang Dec 16 '14 at 2:53

I found an answer. It was due to an ANT_HOME. Found an agent on bamboo where ANT_HOME was configured and made sure that only that agent runs for my plan. It worked fine.

It took me 100 attempts to see "green". At 100th run I was able to deploy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.