Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Does TFS Repository plugin work with Elastic Agents?

Deleted user September 22, 2015

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

0 votes
Sergey Podobry _Stellarity Software_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 2015

Hi Jeff,

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

Deleted user December 2, 2015

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

Sergey Podobry _Stellarity Software_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2015

Ok.

0 votes
Corey Hemminger September 23, 2015

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\....

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events