How to find out current working directory in Bamboo?

James Raitsev picture James Raitsev · May 2, 2012 · Viewed 7.8k times · Source

This seemed like a good idea at the time

public static final String MY_CONFIG_FILE = System.getenv("APP_HOME") 
                                              + "/cfg/app.properties";

When pushed code to Bamboo some tests failed with

java.io.FileNotFoundException: ./cfg/app.properties (No such file or directory)

I did set EnvironmentVariable in Bamboo as APP_HOME=.

Still, however, Bamboo can't seem to find the file. What am i doing wrong please?

Answer

James Raitsev picture James Raitsev · May 2, 2012

In case someone is interested, in order to reference current working directory, APP_HOME should be set to:

APP_HOME=${bamboo.build.working.directory}