Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How can I change the users home directory in bamboo ?

When I look at the properties of my remote agent,  the users home directory is being set to C:\Users\TEMP.  Is there a way to set it to the C:\Users\<user running bamboo> ?

I'm referring to the users home directory.  Not the bamboo build directory.

1 answer

0 votes

Hi @Hector Magnanao,

If you already have a remote agent running, you could:

  1. stop Bamboo remote agent
  2. edit <bamboo-remote-home>/conf/wrapper.conf and update property to point to the chosen location in filesystem:
    wrapper.java.additional.1=-Dbamboo.home=C:\Users\TEMP
  3. copy <bamboo-remote-home> to the location specified above
  4. start Bamboo remote agent

If you are installing a new remote agent, you can provide <bamboo-remote-home> directory in java command:

java -Dbamboo.home=/path/to/bamboo-remote-home -jar atlassian-bamboo-agent-installer-X.X-SNAPSHOT.jar http://bamboo-host-server:8085/agentServer/

Please, refer to the following documentation for further information:

Note: User running Bamboo remote agent must have full access to the directory specified.

Kind regards,

Rafael

Hi Rafael,

the bamboo home directory is set correctly.  It's the bamboo users home directory that is being set to C:\Users\TEMP.  It should be set to C:\Users\<bamboo account>

This is causing the builds to fail because it can't find the settings.xml file in the correct folder.  I can't use the current directory because it might be removed one day.

The system properties of the bamboo agent is attached.  The problem is circled in red.

 

bamboo_sysproperties.PNG

rsperafico Atlassian Team Apr 11, 2018

Hi @Hector Magnanao,

That is the temp directory and you can updated it by:

  1. stop Bamboo remote agent
  2. edit <bamboo-remote-home>/conf/wrapper.conf and update property to point to the chosen location in filesystem:
    wrapper.java.additional.X=-Djava.io.tmpdir=C:\Users\TEMP
    where .X is the following number in sequence
  3. copy <bamboo-remote-home> to the location specified above
  4. start Bamboo remote agent

Kind regards,

Rafael

Hi Rafael,

When I tried to set that variable to C:\Users\3_bamboo in the wrapper.conf file, the User Home is being set to C:\

I would like to set User Home in that window to C:\Users\3_bamboo

I believe that if I can set the User Home to this value, then the temporary directory will also be set correctly.

How do I set the User Home directory in that conf file ?

rsperafico Atlassian Team Apr 11, 2018

Hi @Hector Magnanao,

Could you share wrapper.conf displaying all wrapper.java.additional properties?

What is the output for Temporary directory?

What is the user running Bamboo remote agent? If running as a Windows Service, please run using Local user instead of System.

What is the output of command from CMD?

echo %homepath%

Kind regards,

Rafael

Hi @rsperafico

contents of wrapper.conf (default content):

# The Bamboo Agent home configuration file
wrapper.java.additional.1=-Dbamboo.home="D:\bamboo-agent-home"
wrapper.java.additional.2=-Dbamboo.agent.ignoreServerCertName=false
#wrapper.java.additional.3=-Dlog4j.configuration=
#wrapper.java.additional.3=-agentlib:yjpagent

output for temporary directory:

Temporary directoryC:\Users\TEMP\AppData\Local\Temp\

the user running Bamboo remote agent is 3_bamboo.  This is the service account that we need to run in bamboo. 

Unfortunately we are not allowed to login directly into the bamboo agent as a service account.  I can only login as myself. so echo %homepath%

C:\Users\i842625>echo %homepath%
\Users\i842625

rsperafico Atlassian Team Apr 12, 2018

Hi @Hector Magnanao,

In the same way Bamboo gets the temporary directory, e.g:

tempDir = sysProps.getProperty("java.io.tmpdir");

You could try and set up a new user home directory by providing "-Duser.home" as property that should be read by Bamboo from:

userHome = sysProps.getProperty("user.home");

So wrapper.conf should be:

# The Bamboo Agent home configuration file
wrapper.java.additional.1=-Dbamboo.home="D:\bamboo-agent-home"
wrapper.java.additional.2=-Dbamboo.agent.ignoreServerCertName=false
wrapper.java.additional.3=-Duser.home="C:\Users\<user running bamboo>"
#wrapper.java.additional.3=-Dlog4j.configuration=
#wrapper.java.additional.3=-agentlib:yjpagent

Kind regards,

Rafael

Rafael

 

Where do I set this variable in ?

userHome = sysProps.getProperty("user.home"); 

Hi @Hector Magnanao,

You don't, simply add the property -Duser.home to wrapper.conf as mentioned previously.

# The Bamboo Agent home configuration file
wrapper.java.additional.1=-Dbamboo.home="D:\bamboo-agent-home"
wrapper.java.additional.2=-Dbamboo.agent.ignoreServerCertName=false
wrapper.java.additional.3=-Duser.home="C:\Users\<user running bamboo>"
#wrapper.java.additional.3=-Dlog4j.configuration=
#wrapper.java.additional.3=-agentlib:yjpagent

Note: Bamboo remote agent must be restarted so changes can be applied.

Kind regards,

Rafael

Hi @rsperafico

Ok, so that worked.  I see that the user home directory is now set correctly.  

But,  it looks like C:\Users\temp is still being used by the build.  It appears that way because the repository is being created under C:\Users\Temp.  

Any ideas why this is happening ?

rsperafico Atlassian Team Apr 12, 2018

Hi @Hector Magnanao,

It appears that way because the repository is being created under C:\Users\Temp.

Are you referring to the repository caching? What is the content of C:\Users\temp?

Kind regards,

Rafael

Hi @rsperafico

Yes.  The content is .m2, settings files and the repository folders in it.

Hi @Hector Magnanao,

Please, raise a support case under https://support.atlassian.com so information related to directory and build logs can be shared.

Kind regards,

Rafael

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

186 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you