Does TFS Repository plugin work with Elastic Agents?

We've recently moved our Bamboo environment to AWS and are try to utilize the Elastic Agents feature. However, when we run a job that attempts to get source code from TFS we get the following error.  

 

Updating source code to revision: 52771
                22-Sep-2015 09:20:20                Error occurred while running Task 'Pull latest Mobile.Internal source code from MAIN(3)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout.
                22-Sep-2015 09:20:20                java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: java.lang.NullPointerException: file must not be null
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:172)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:288)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:284)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:200)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:284)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.task.TaskExecutorImpl.executePreparationTasks(TaskExecutorImpl.java:81)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.build.pipeline.tasks.PrepareBuildTask.call(PrepareBuildTask.java:74)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:124)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:115)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:114)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
                22-Sep-2015 09:20:20                        at java.lang.Thread.run(Thread.java:745)
                22-Sep-2015 09:20:20                Caused by: com.atlassian.bamboo.repository.RepositoryException: java.lang.NullPointerException: file must not be null
                22-Sep-2015 09:20:20                        at com.stellarity.bamboo.repository.TfsRepository.retrieveSourceCode(TfsRepository.java:406)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:259)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$100(VcsCheckoutTask.java:56)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:177)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$2.call(VcsCheckoutTask.java:173)
                22-Sep-2015 09:20:20                        at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)
                22-Sep-2015 09:20:20                        ... 21 more
                22-Sep-2015 09:20:20                Caused by: java.lang.NullPointerException: file must not be null
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.util.Check.throwForNull(Check.java:135)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.util.Check.notNull(Check.java:28)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.core.clients.versioncontrol.workspacecache.internal.InternalCacheLoader.loadConfig(InternalCacheLoader.java:89)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.core.clients.versioncontrol.Workstation.<init>(Workstation.java:150)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.core.clients.versioncontrol.Workstation.getCurrent(Workstation.java:206)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.<init>(VersionControlClient.java:450)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient.<init>(VersionControlClient.java:520)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.core.config.client.DefaultClientFactory$7.newClient(DefaultClientFactory.java:238)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.core.config.client.DefaultClientFactory.newClient(DefaultClientFactory.java:91)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.core.TFSConnection.getClient(TFSConnection.java:1470)
                22-Sep-2015 09:20:20                        at com.microsoft.tfs.core.TFSTeamProjectCollection.getVersionControlClient(TFSTeamProjectCollection.java:359)
                22-Sep-2015 09:20:20                        at com.stellarity.bamboo.repository.TfsRepository.tryToRetrieveSourceCode(TfsRepository.java:791)
                22-Sep-2015 09:20:20                        at com.stellarity.bamboo.repository.TfsRepository.retrieveSourceCode(TfsRepository.java:384)
                22-Sep-2015 09:20:20                        ... 26 more

2 answers

Working with my colleague we have figured out the issue. The plugin on the elastic agent runs under the bamboo user and the bamboo user doesn't have permission to c:\appdata folder for writing. As a work around to using the bamboo windows stock images atlassian provides we are having to create a new image and assign appropriate permissions to the folder to get this plugin to work. Ultimate fix would be to have the plugin use the windows user home directory appdata folder. In the case of the stock images it would be c:\users\Bamboo\appdata\....

Hi Jeff,

I'm sorry for finding your question so late. Do you need any help?

Not at this point. See Corey Hemminger's (a colleague of mine) response above as to what we understood the problem to be.

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

4,355 views 20 13
View question

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you