public class ContinuousReleaseSelectStaticVersionPluginImpl extends SelectStaticVersionPluginBaseImpl implements org.azyva.dragom.model.plugin.SelectStaticVersionPlugin
SelectStaticVersionPlugin implementation that selects the most recent
static Version corresponding to the dynamic Version.
This is useful in a continuous delivery context where the release of each
ModuleVersion in a dependency graph is managed by a job in a build
automation tool (i.e., Jenkins) and where when releasing a ModuleVersion we
expect the referenced ModuleVersion to have already been released by an
upstream job and have a static Version already available.
This is generally used in conjunction with
MainModuleVersionWorkspacePluginFactory since each job performs the
release of a single ModuleVersin.
The selection of a static Version given a dynamic Version is performed using mappings. A mapping specifies a regular expression that matches the dynamic Version and a replacement that specifies the corresponding static Version prefix.
In a pure continuous delivery context only one dynamic Version would be used (e.g., D/master) and for each build a new unique static Version would be released (e.g., S/v-1.#####). In such a case, the mapping could be:
D/master -> S/v-1.
In practice, it is often required to distinguish multiple development lines
producing incompatible versions of the Module. In such a case,
development can be done on development line dynamic Versions and the mapping
could be:
D/develop-cd-(.+) -> S/v-$1.
If development occurs on dynamic Version D/develop-cd-2 (branch develop-cd-2),
the released static Version could be S/v-2.#####, where ##### is an incremental
build number. ArtifactVersionMapperPlugin could be confidered in such a
way as to produce corresponding ArtifactVersion's 2.####.
It is also possible to always use the main dynamic Version for on-going development and switch to a maintenance dynamic Version when a new major incompatible Version line is started on the main dynamic Version. But this generally requires adjustments in referring ModuleVersion if they are to keep referencing the older maintenance line.
| Constructor and Description |
|---|
ContinuousReleaseSelectStaticVersionPluginImpl(org.azyva.dragom.model.Module module)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.azyva.dragom.model.Version |
selectStaticVersion(org.azyva.dragom.model.Version versionDynamic) |
getListVersionStaticForDynamicVersion, getListVersionStaticGlobal, getNewStaticVersionFromPrefix, getVersionLatestMatchingVersionStaticPrefix, handleExistingEquivalentStaticVersion, handleSpecificStaticVersion, handleSpecificStaticVersionPrefix, setDefaultInitialRevision, setDefaultRevisionDecimalPositionCount, validateVersionDynamicgetModule, toStringgetNodeCopyright © 2015–2016 AZYVA INC.. All rights reserved.