How to find out current working directory in Bamboo?
Asked Answered
F

1

10

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?

Fleurette answered 2/5, 2012 at 16:4 Comment(0)
F
16

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

APP_HOME=${bamboo.build.working.directory}
Fleurette answered 2/5, 2012 at 20:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.