Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-14978

Plan variables are not evaluated when used in Repository URL for branches

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • 5.9
    • 5.6.1
    • None
    • None

    Description

      We have a Subversion repository containing several hundred software projects. I have configured a build plan in Bamboo for each software project from subversion.

      The repository URL is in the format http://server.example.com/subversion/projectName/trunk.

      I wanted to create a single linked repository that can be used by all the plans. I didn't see the Plan Name listed a variable in the documentation, so I created a variable in each plan named "svn_project" that could be used in the Repository URL string (http://server.example.com:81/subversion/${bamboo.svn_project}/trunk)

      This is working correctly for my regular source code checkout tasks from trunk, but Bamboo doesn't seem to be replacing the variable with its value when detecting branches - I see the following error in the logs:

      2014-09-01 16:37:09,298 ERROR [8-BranchDetectionBackgroundThread:pool-16-thread-2] [RetryingTaskExecutor] Failed to run task 'Detecting branches Subversion' after 2 attempts. Task was not executed.
      2014-09-01 16:37:09,298 ERROR [8-BranchDetectionBackgroundThread:pool-16-thread-2] [RetryingTaskExecutor] Exception being rethrown
      2014-09-01 16:37:09,298 ERROR [8-BranchDetectionBackgroundThread:pool-16-thread-2] [BambooPluginUtils] An unexpected error has occurred while detecting branches: PGC-PGCLIBS
      java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: Path http://server.example.com:81/subversion/$%7Bbamboo.svn_project%7D/branches does not exist. Please check configuration of SVN repository in this job.
      at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:132)
      at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88)
      at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191)
      at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:176)
      at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1.load(RepositoryCachingFacadeImpl.java:41)
      at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1.load(RepositoryCachingFacadeImpl.java:29)
      at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
      at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
      at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
      at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
      at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
      at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
      at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
      at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl.getOpenBranches(RepositoryCachingFacadeImpl.java:69)
      at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.getOpenBranches(BranchDetectionServiceImpl.java:681)
      at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.findBranchesCreatedBeforePlanCreation(BranchDetectionServiceImpl.java:549)
      at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl.access$700(BranchDetectionServiceImpl.java:82)
      at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1$1.doInHibernate(BranchDetectionServiceImpl.java:261)
      at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370)
      at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337)
      at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector$1.run(BranchDetectionServiceImpl.java:248)
      at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:147)
      at com.atlassian.bamboo.plugin.BambooPluginUtils$Runnable.call(BambooPluginUtils.java:137)
      at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:87)
      at com.atlassian.bamboo.plan.branch.BranchDetectionServiceImpl$BranchDetector.run(BranchDetectionServiceImpl.java:310)
      at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
      at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
      at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
      at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
      at java.lang.Thread.run(Thread.java:724)
      Caused by: com.atlassian.bamboo.repository.RepositoryException: Path http://server.example.com:81/subversion/$%7Bbamboo.svn_project%7D/branches does not exist. Please check configuration of SVN repository in this job.
      at com.atlassian.bamboo.repository.svn.SvnRepository.getOpenBranches(SvnRepository.java:2009)
      at com.atlassian.bamboo.repository.svn.SvnRepository.getOpenBranches(SvnRepository.java:1992)
      at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1$1.call(RepositoryCachingFacadeImpl.java:46)
      at com.atlassian.bamboo.repository.RepositoryCachingFacadeImpl$1$1.call(RepositoryCachingFacadeImpl.java:42)
      at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108)
      ... 29 more

      I am using the latest 5.6.1 version of Bamboo.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              99ff2211d7b4 Nick Clarke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: