Shared resources across projects

I have a project Template that contains two build configurations and a shared resource, the build configurations reference the shared resource as a write lock with a resource quote of 1. Looking at Templates shared resource tab it states the resource is used by two build configurations. I create new projects by copying the project Template via the REST API call <newProjectDescription name='%s' sourceProjectLocator='name:%s' copyAllAssociatedSettings='true' shareVCSRoots='false'/>. I create two projects, Project1 and Project2 by copying Template via REST. Each newly created project has two build configurations that reference a shared resource with the same name as Templates shared resource. Looking at the shared resource tab for each project it states the resource is used by two build configurations. However, when I run a build in Project1 then Project2, Project2's is queued as clearly the shared resource is Templates. It looks like the shared resource is used now by six build configurations. Firstly, is it correct a shared resource is at server scope, i.e. any project can reference another projects shared resource? Also, looking at Templates shared resource tab houldn't I see six build configurations using it rather than two? Thx

1 comment
Comment actions Permalink

Jason, as to the questions:
1) Project can use any shared resource that is visible to it. That is, a resource, that is defined earlier in the project tree (for example, all projects can use resources defined in Root project)
2) Resource usage is calculated by scanning subtree of the current project. In your case, you have tree projects on the same level of the project tree, so the usage is not calculated correctly. SharedResources plugin currently does not handle project copying correctly

We have issue in tracker that addresses behavior you are observing: Please watch/vote for it


Please sign in to leave a comment.