2

We are just starting to look to implement Bamboo Specs for storing all our configurations in a single git repository. I'm working through some issues with the server not being able to reach the maven resources on the web but thing I have that figured out as there is no proxy configured. But until then I cannot scan my repos for specs. We decided to have all our projects specs files located in a single repository for centralized maintainability. I've been looking online but cannot find any suggestions as to the best way to include multiple configurations in a single repo.

My initial thoughts are something like the following. Can anyone provide some guidance as to the best way to organize all my configurations?

Note that many plans will share common modules so thinking the 2nd way would be better if Bamboo can properly work with this structure.

bamboo-specs
        |
        - plan1
              - src
                    - main
                           - java
                                - project
                                         - PlanSpec.java
        - plan2
              - src
                    - main
                           - java
                                - project
                                         - PlanSpec.java

or

bamboo-specs
        |
        - src
             - main
                   - java
                         - plan1
                                 - PlanSpec.java
                         - plan2
                                 - PlanSpec.java
Jason Templeman
  • 431
  • 5
  • 21

3 Answers3

1

I personally have a common library and specs at the same level, something like this, but I am pushing manually the plans to Bamboo (and not using the auto update from repo feature):

├── common
│   ├── pom.xml
│   └── src
├── project1
│   ├── project1-specs
│   │   ├── pom.xml
│   │   └── src
│   └── pom.xml
└── project2
    ├── pom.xml
    └── project2-specs
        ├── pom.xml
        └── src

More about this organization is explained here.

Raffi
  • 3,068
  • 31
  • 33
0

Here is the answer I received from Atlassian

specsrepo/bamboo-specs/src/main/java
| => tree
.
└── tutorial
    ├── PlanSpec.java
    └── PlanSpec2.java
Jason Templeman
  • 431
  • 5
  • 21
0

The latter. This answer is based on the fact that I always apply all plan specs at once. This is because Bamboo will apply them all as well (by scanning for the @BambooSpecs annotation in all classes from the repo). I use IntelliJ to apply only a single plan while developing. Next to that, sharing code between classes is easier if they're in the same maven project (no need to mvn install/deploy).

Remember that Bamboo uses its own pom.xml (resides on the Bamboo master server) and not the one in your project repo. If you add extra maven dependencies you'll have to add them at both places.

At the moment, our specs repo has more than 300 java files. There's a "common" package on top and multiple nested subpackages for various class grouping (aka cohesion).

├── pom.xml
└── src
    ├── main
    │   └── java
    │       └── no-need-for-package-if-you-wont-publish-classes
    │           ├── common
    │           ├-─ devs
    │           │   └── PlanX.java
    │           │   └── PlanY.java
    │           └── devops
    │               └── PlanZWithDeployments.java
    └── test
Alex
  • 1,313
  • 14
  • 28