Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out current working directory in Bamboo?

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?

like image 559
James Raitsev Avatar asked May 02 '12 16:05

James Raitsev


People also ask

Where is Bamboo build working directory?

By default, this directory is located under the xml-data directory in the Bamboo home directory. To change the location of Bamboo's working directory: Shut down Bamboo.

Where is Bamboo home directory?

For Bamboo running as a Windows service, it's at %WINDIR%\System32\Config\systemprofile\bamboo. log. This directory is used when deploying Bamboo apps.

What is clean working directory task in Bamboo?

Use "Clean working directory task" to clean working directory in a Job. If this task is a first task in a Job it will be run before artifact dependencies are downloaded.

How do I set a global variable in Bamboo?

To access the Global variables page:From the top navigation bar select > Build resources > Global variables. Add, update, or delete the global variables, as desired: Add a new variable once you have entered the key and value for it. Updates to existing rows will be saved as you move between cells in the table.


1 Answers

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

APP_HOME=${bamboo.build.working.directory}
like image 126
James Raitsev Avatar answered Oct 28 '22 03:10

James Raitsev