public class MainModuleVersionWorkspacePluginFactory extends Object implements org.azyva.dragom.execcontext.plugin.ExecContextPluginFactory<org.azyva.dragom.execcontext.plugin.WorkspacePlugin>
ExecContextPluginFactory for WorkspacePlugin that assumes a
main ModuleVersion (WorkspaceDirUserModuleVersion) already
checked out in the root of the ExecContext workspace directory.
Since the root of the ExecContext workspace directory is occupied by the main ModuleVersion and Dragom needs to have a metadata directory, that main MmoduleVersion will have this metadata directory present at the root of its workspace directory. It will not have its own totally independent workspace directory.
The other ModuleVersions (WorkspaceDirSystemModule) required during
Dragom's execution will be within that metadata directory.
This is useful in a continuous delivery context where a single ModuleVersion needs to be released, independently of the other ModuleVersion's which may be present in a dependency graph.
Typically, a job would be defined in a build automation tool (e.g., Jenkins) that would checkout from the SCM the version of a module and then launch Dragom ReleaseTool configured with this WorkspacePlugin factory.
This is generally used in conjunction with
ContinuousReleaseSelectStaticVersionPluginImpl since the job must focus on
releasing only that single ModuleVersion and expect to find existing static
Version's for referenced ModuleVersion's.
When the workspace has not been initlized yet, the main ModuleVersion must be specified using the runtime property MAIN_MODULE_VERSION. Once initialized, the ModuleVersion is persisted within the ExecContext and the MAIN_MODULE_VERSION runtime property need not be specified anymore, but if it is, it must refer to the same ModuleVersion.
This class cannot be a simple WorkspacePlugin implementation to be used
in conjunction with GenericExecContextPluginFactory since the creation
of an instance may actually require unmarshalling existing workspace data from
a file within the ExecContext workspace.
Requires a WorkspaceExecContext.
There are similarities between this class and
DefaultWorkspacePluginFactory and there are probably opportunities for
factoring out common code. For now, they are independent with some redundancy.
TODO: Assumes dragom metadata dir exists, but may not be initialized based on version.
Multiple Versions of the same Module are not supported in user workspace directories.
| Constructor and Description |
|---|
MainModuleVersionWorkspacePluginFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.azyva.dragom.execcontext.plugin.WorkspacePlugin |
getExecContextPlugin(org.azyva.dragom.execcontext.ExecContext execContext) |
public MainModuleVersionWorkspacePluginFactory()
public org.azyva.dragom.execcontext.plugin.WorkspacePlugin getExecContextPlugin(org.azyva.dragom.execcontext.ExecContext execContext)
getExecContextPlugin in interface org.azyva.dragom.execcontext.plugin.ExecContextPluginFactory<org.azyva.dragom.execcontext.plugin.WorkspacePlugin>Copyright © 2015–2016 AZYVA INC.. All rights reserved.