public class SetupJenkinsJobs extends RootModuleVersionJobAbstractImpl
ModuleVersion's in a
ReferenceGraph.
Although creating jobs in a tool such as Jenkins based on a ReferenceGraph is a common that should probably be abstracted, this class is currently specific to Jenkins. Time, experience and maturity will tell if, when and how this process should be abstracted into plugins. But for now at this early stage, it is not deemed pertinent to undertake such a task.
Note however that although this class is specific to Jenkins, it still makes
use of JenkinsJobInfoPlugin to abstract the actual job creation
details, namely the config.xml file or the template parameters.
Jobs and folders created by this class are recorded in an items created file,
whose content is also used as input if it already exists, in conjunction with a
SetupJenkinsJobs.ExistingItemsCreatedFileMode. The default items created file, if
setPathItemsCreatedFile(java.nio.file.Path) is not called, is jenkins-items-created.txt in
the metadata directory of the workspace. The default
ExistingItemsCreatedFileMode, if setExistingItemsCreatedFileMode(org.azyva.dragom.job.SetupJenkinsJobs.ExistingItemsCreatedFileMode) is not
called, is SetupJenkinsJobs.ExistingItemsCreatedFileMode.MERGE.
| Modifier and Type | Class and Description |
|---|---|
static class |
SetupJenkinsJobs.ExistingItemsCreatedFileMode
Modes for handling the items created file if it already exists.
|
RootModuleVersionJobAbstractImpl.UnsyncChangesBehaviorindAvoidReentry, indDepthFirst, indHandleDynamicVersion, indHandleStaticVersion, indListModuleVersionRootChanged, listActionsPerformed, listModuleVersionRoot, moduleReentryAvoider, MSG_PATTERN_KEY_ACTIONS_PERFORMED, MSG_PATTERN_KEY_CANNOT_PROCEED_WITH_UNSYNC_LOCAL_CHANGES, MSG_PATTERN_KEY_CONFLICTS_WHILE_UPDATING, MSG_PATTERN_KEY_DO_YOU_WANT_TO_UPDATE_UNSYNC_REMOTE_CHANGES, MSG_PATTERN_KEY_INITIATING_TRAVERSAL_REFERENCE_GRAPH_ROOT_MODULE_VERSION, MSG_PATTERN_KEY_MODULE_VERSION_ALREADY_PROCESSED, MSG_PATTERN_KEY_MULTIPLE_WORKSPACE_DIRECTORIES_FOR_MODULE, MSG_PATTERN_KEY_NO_ACTIONS_PERFORMED, MSG_PATTERN_KEY_ROOT_MODULE_VERSION_NOT_KNOWN, MSG_PATTERN_KEY_TRAVERSAL_REFERENCE_GRAPH_ROOT_MODULE_VERSION_COMPLETED, MSG_PATTERN_KEY_UPDATE_CHANGED_ROOT_MODULE_VERSION, MSG_PATTERN_KEY_UPDATE_ROOT_MODULE_VERSION_TO_DEFAULT, MSG_PATTERN_KEY_UPDATE_ROOT_MODULE_VERSION_TO_WORKSPACE_DIRECTORY_VERSION, MSG_PATTERN_KEY_UPDATING, MSG_PATTERN_KEY_VERSION_DOES_NOT_EXIST, MSG_PATTERN_KEY_VISITING_LEAF_MODULE_VERSION, MSG_PATTERN_KEY_VISITING_LEAF_REFERENCE_MATCHED, referencePath, RUNTIME_PROPERTY_PROJECT_CODE, RUNTIME_PROPERTY_SYNC_WORKSPACE_DIR, unsyncChangesBehaviorLocal, unsyncChangesBehaviorRemote| Constructor and Description |
|---|
SetupJenkinsJobs(List<org.azyva.dragom.model.ModuleVersion> listModuleVersionRoot)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
performJob()
Main method for performing the job.
|
void |
setExistingItemsCreatedFileMode(SetupJenkinsJobs.ExistingItemsCreatedFileMode existingItemsCreatedFileMode) |
void |
setPathItemsCreatedFile(Path pathItemsCreatedFile) |
afterIterateListModuleVersionRoot, beforeIterateListModuleVersionRoot, beforeValidateListModuleVersionRoot, getProjectCode, getReferencePathMatcher, isListModuleVersionRootChanged, iterateListModuleVersionRoot, setIndAvoidReentry, setIndDepthFirst, setIndHandleDynamicVersion, setIndHandleStaticVersion, setIndListModuleVersionRootChanged, setReferencePathMatcherProvided, setUnsyncChangesBehaviorLocal, setUnsyncChangesBehaviorRemote, setupReferencePathMatcherForProjectCode, validateListModuleVersionRoot, visitMatchedModuleVersion, visitModuleVersionpublic SetupJenkinsJobs(List<org.azyva.dragom.model.ModuleVersion> listModuleVersionRoot)
listModuleVersionRoot - List of root ModuleVersion's.public void setPathItemsCreatedFile(Path pathItemsCreatedFile)
pathItemsCreatedFile - Path to the items created file. Can be null to
disable items created file handling. If not called, the default items created
file is jenkins-items-created.txt in the metadata directory of the workspace.public void setExistingItemsCreatedFileMode(SetupJenkinsJobs.ExistingItemsCreatedFileMode existingItemsCreatedFileMode)
existingItemsCreatedFileMode - ExistingItemsCreatedFileMode. If not
called, the default ExistingItemsCreatedFileMode is
SetupJenkinsJobs.ExistingItemsCreatedFileMode.MERGE.public void performJob()
performJob in class RootModuleVersionJobAbstractImplCopyright © 2015–2016 AZYVA INC.. All rights reserved.