Dependencies Between Projects Scenario
Larry is a developer on a custom Logging project that is reused by virtually every project
in his organization including Oscar's Order Entry project. Both projects are configured in
AnthillPro along with the dependency relationship between them. AnthillPro can help with
the management of this dependency relationship during the development process when the
relationship is in constant flux and during release when this relationship needs to be strictly
defined and controlled.
Whenever there is a build of the Logging project, the reusable artifacts for the project are
stored by AnthillPro in an artifacts repository. When an Order Entry project is then built,
one of the steps during the build process retrieves the artifacts of all dependencies (as
configured in AnthillPro) and makes them available to the build. The exact version of the
artifact of each dependency is recorded and stored in the BuildLife thus ensuring complete traceability.
While both Larry and Oscar are actively developing their projects, the dependency configuration
between their projects in AnthillPro may be defined to always use the latest available artifacts
of the Logging library when building the Order Entry project. This way, as Larry implements features
required by the Order Entry project they become available and usable to the Order Entry project. Meanwhile
each Living Build of the Order Entry project has full traceability to the exact BuildLife of the
Logging project that produced the artifacts being reused. As the BuildLife of the Order Entry project
is promoted, it can send events to the Logging project BuildLife that produced the artifacts. Such
events can result in the Logging project BuildLife being promoted as well.
Of course, AnthillPro will also allow the dependency relationship between the projects to be
more constrained. The Order Entry project can be configured to always use a specific version
of the Logging project artifacts. Or, the Order Entry project can be configured to use the artifact
of the latest BuildLife to reach a pre-specified status. For example, if the Logging project is
defined with three statuses: Build-Success, QA Approved, and In Production, the Order Entry project
can be configured to always use the latest artifacts to have attained the QA Approved status (or any
of the other statuses).
The dependency between the Order Entry and the Logging projects may be configured in such a way
that whenever there is a build request for the Order Entry project, AnthillPro will check whether
Logging project has any new source code commits not reflected in the latest artifacts. If such
new source code if detected, then AnthillPro would then build the Logging project prior to building
the Order Entry project. This is what we call "pulling" builds since the Order Entry project is
pulling a build of the Logging project. In this way, AnthillPro will ensure that the latest
artifacts of each dependency are always being used. This approach is most helpful in tightly coupled
projects where a single developer will often touch both projects to fix an issue.
AnthillPro also supports "pushing" builds. The Order Entry project may be configured with a build
definition that always uses the latest artifact of the Logging project. In fact, every project
defined within AnthillPro that is configured with a dependency on the Logging project may be
configured with a build definition that always uses the latest artifact of the Logging project.
This is in addition to any other build definition that is configured to use either a pre-specified
version of the Logging project artifacts or artifacts from a pre-specified status of the Logging
project. Now, the Logging project may be configured with a BuildLife stage that will trigger builds
of all the projects that have a dependency on it. The purpose of doing this is to determine whether
the new changes committed to the Logging project have produced any problems in any of the projects
that are dependent on it.
Although this scenario included only two projects in a simple dependency relationship, AnthillPro
supports any acyclic graph of dependencies. Most importantly, Larry and Oscar stopped fighting and
are friends again.