Bamboo Windows Remote Agent Setup May 24th, 2017
I am not a C# or Atlassian Bamboo expert so getting this all working correctly required a lot of trial-and-error. However, with the steps below I was able to successfully automate building and testing a C# .NET project with Atlassian Bamboo 6.0.
On the Windows machine that will run the remote agent follow these steps:
- Create new Windows "bamboo" admin user and login as that user
- Download and install JDK 1.8
- Add Java install path to JAVA_HOME environment variable (Add to both "User variables for Administrator" and "System Variables")
- Confirm environment variable set correctly:
- Go to your Bamboo instance (something like http://bamboo.com/admin/agent/addRemoteAgent.action)
- Click button to "DOWNLOAD Remote Agent JAR"
- Open new admin cmd window then navigate to download directory and run remote agent installer:
java -jar c:\Users\bamboo\Downloads\atlassian-bamboo-agent-installer-6.0.0.jar http://bamboo.com/agentServer/
- Close cmd window and open a new admin cmd window to install service
- I was getting an error "The directory name is invalid" when using MSTest runner task. To resolve this error you need to set Bamboo to run as the "bamboo" user. Open up the Windows Services tool and set Bamboo to run as user "bamboo" 'Bamboo Remote Agent > Log On'
- Install MSBuild Tools
- Install Visual Studio
- Reboot machine
After the remote agent is setup login to your Bamboo instance and follow these steps:
- If the Windows remote agent just cannot seem to connect you need to ensure that "Broker client URL" is setup correctly in 'Administration > Overview > General configuration'. With this URL the remote agent should be able to connect back to the Bamboo instance. You have to reboot Bamboo after making any changes to this value.
- Navigate to 'Administration > Agents > Remote agents > Agent authentication' and click "Approve access" for the agent
- Ensure that agent appears in "Online remote agents" tab
- Add VSTest Runner executable 'Administration > Agents > Remote agents > Online remote agents > FFWS > Add Executable'
- Add Visual Studio executable 'Administration > Agents > Remote agents > Online remote agents > FFWS > Add Executable'
After you get everything setup you should be able to use MSBuild to build your project. In your Plan Configuration jobs can be configured like so:MSBuild
MSBuild capability should be automatically detected by the Windows remote agent. Your MSBuild config should look something like this:
Your VSTest Runner config should look something like this:
blog comments powered by Disqus