public abstract class AbstractClearCaseScm
extends hudson.scm.SCM
Modifier and Type | Class and Description |
---|---|
static class |
AbstractClearCaseScm.AbstractClearCaseScmDescriptor<T extends AbstractClearCaseScm> |
static class |
AbstractClearCaseScm.ChangeSetLevel
The change set level describes which level of details will be in the changeset
|
Modifier and Type | Field and Description |
---|---|
static String |
CLEARCASE_VIEWNAME_ENVSTR |
static String |
CLEARCASE_VIEWPATH_ENVSTR |
static String |
CLEARCASE_VIEWTAG_ENVSTR |
protected static String |
REGEX_WHITESPACE
Regular Expression Search String for Whitespace.
|
Constructor and Description |
---|
AbstractClearCaseScm(String viewName,
String mkviewOptionalParam,
boolean filterOutDestroySubBranchEvent,
boolean useUpdate,
boolean rmviewonrename,
String excludedRegions,
boolean useDynamicView,
String viewDrive,
boolean extractLoadRules,
String loadRules,
boolean useOtherLoadRulesForPolling,
String loadRulesForPolling,
String multiSitePollBuffer,
boolean createDynView,
boolean freezeCode,
boolean recreateView,
String viewPath,
AbstractClearCaseScm.ChangeSetLevel changeset,
ViewStorage viewStorage) |
Modifier and Type | Method and Description |
---|---|
void |
buildEnvVars(hudson.model.AbstractBuild<?,?> build,
Map<String,String> env)
Adds the env variable for the ClearCase SCMs.
|
hudson.scm.SCMRevisionState |
calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener taskListener) |
hudson.scm.SCMRevisionState |
calcRevisionsFromPoll(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener taskListener) |
boolean |
checkout(hudson.model.AbstractBuild build,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.BuildListener listener,
File changelogFile) |
protected hudson.scm.PollingResult |
compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project,
hudson.Launcher launcher,
hudson.FilePath workspace,
hudson.model.TaskListener listener,
hudson.scm.SCMRevisionState baseline) |
protected String |
computeExtendedViewPath(hudson.util.VariableResolver<String> variableResolver,
ClearTool ct) |
Filter |
configureFilters(hudson.util.VariableResolver<String> variableResolver,
hudson.model.AbstractBuild build,
hudson.Launcher launcher) |
protected abstract CheckoutAction |
createCheckOutAction(hudson.util.VariableResolver<String> variableResolver,
ClearToolLauncher launcher,
hudson.model.AbstractBuild<?,?> build)
Create a CheckOutAction that will be used by the checkout method.
|
protected ClearTool |
createClearTool(hudson.util.VariableResolver<String> variableResolver,
ClearToolLauncher launcher) |
ClearToolLauncher |
createClearToolLauncher(hudson.model.TaskListener listener,
hudson.FilePath workspace,
hudson.Launcher launcher)
Creates a Hudson clear tool launcher.
|
protected abstract HistoryAction |
createHistoryAction(hudson.util.VariableResolver<String> variableResolver,
ClearToolLauncher launcher,
hudson.model.AbstractBuild<?,?> build,
hudson.scm.SCMRevisionState baseline,
boolean useRecurse)
Create a HistoryAction that will be used by the pollChanges() and checkout() method.
|
protected hudson.scm.SCMRevisionState |
createRevisionState(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
hudson.model.TaskListener taskListener,
Date date) |
protected abstract SaveChangeLogAction |
createSaveChangeLogAction(ClearToolLauncher launcher)
Create a SaveChangeLog action that is used to save a change log
|
String |
generateNormalizedViewName(hudson.model.AbstractBuild<?,?> build) |
String |
generateNormalizedViewName(hudson.util.VariableResolver<String> variableResolver) |
String |
generateNormalizedViewName(hudson.util.VariableResolver<String> variableResolver,
String modViewName)
Returns a normalized view name that will be used in cleartool commands.
|
String[] |
getBranchNames()
Deprecated.
use
getBranchNames(VariableResolver) instead |
abstract String[] |
getBranchNames(hudson.util.VariableResolver<String> variableResolver)
Return string array containing the branch names that should be used when polling for changes.
|
hudson.model.Computer |
getBuildComputer(hudson.model.AbstractBuild<?,?> build)
Returns the computer a given build ran on.
|
protected Date |
getBuildTime(hudson.model.Run<?,?> lastBuild) |
AbstractClearCaseScm.ChangeSetLevel |
getChangeset() |
hudson.model.Computer |
getCurrentComputer()
Returns the current computer - used in constructor for BuildVariableResolver in place of direct call to Computer.currentComputer() so we can mock it in
unit tests.
|
String |
getExcludedRegions() |
String[] |
getExcludedRegionsNormalized() |
String |
getLoadRules() |
String |
getLoadRules(hudson.util.VariableResolver<String> variableResolver) |
String |
getLoadRules(hudson.util.VariableResolver<String> variableResolver,
boolean forPolling) |
String |
getLoadRulesForPolling() |
String |
getMkviewOptionalParam()
Returns the user configured optional params that will be used in when creating a new view.
|
hudson.FilePath |
getModuleRoot(hudson.FilePath workspace) |
hudson.FilePath |
getModuleRoot(hudson.FilePath workspace,
hudson.model.AbstractBuild build) |
int |
getMultiSitePollBuffer() |
protected String |
getNormalizedViewName() |
protected String |
getNormalizedViewPath() |
String |
getViewDrive() |
String |
getViewName() |
String |
getViewName(hudson.util.VariableResolver<String> variableResolver) |
String |
getViewPath() |
String |
getViewPath(hudson.util.VariableResolver<String> variableResolver) |
String[] |
getViewPaths(hudson.util.VariableResolver<String> variableResolver,
hudson.model.AbstractBuild build,
hudson.Launcher launcher)
Return string array containing the paths in the view that should be used when polling for changes.
|
String[] |
getViewPaths(hudson.util.VariableResolver<String> variableResolver,
hudson.model.AbstractBuild build,
hudson.Launcher launcher,
boolean forPolling)
Return string array containing the paths in the view that should be used when polling for changes.
|
static String |
getViewPathsRegexp(String[] loadRules,
boolean isUnix) |
ViewStorage |
getViewStorage() |
protected ViewStorage |
getViewStorageOrDefault() |
UcmWorkflow |
getWorkflow() |
protected boolean |
hasNewConfigSpec(hudson.util.VariableResolver<String> variableResolver,
ClearToolLauncher cclauncher) |
protected void |
inspectConfigAction(hudson.util.VariableResolver<String> variableResolver,
ClearToolLauncher launcher)
inspect config action that will be used by the checkout method.
|
protected boolean |
invalidRevisionState(hudson.scm.SCMRevisionState baseline) |
boolean |
isCreateDynView() |
boolean |
isExtractLoadRules() |
boolean |
isFilteringOutDestroySubBranchEvent()
Returns if the "Destroyed branch" event should be filtered out or not.
For more information about the boolean, see the full discussion at Nabble. |
protected abstract boolean |
isFirstBuild(hudson.scm.SCMRevisionState baseline) |
boolean |
isFreezeCode() |
boolean |
isRecreateView() |
boolean |
isRemoveViewOnRename() |
boolean |
isUseDynamicView() |
boolean |
isUseOtherLoadRulesForPolling() |
boolean |
isUseUpdate() |
boolean |
processWorkspaceBeforeDeletion(hudson.model.AbstractProject<?,?> project,
hudson.FilePath workspace,
hudson.model.Node node) |
Object |
readResolve() |
boolean |
requiresWorkspaceForPolling() |
protected void |
setChangeset(AbstractClearCaseScm.ChangeSetLevel changeset) |
protected void |
setExtendedViewPath(hudson.util.VariableResolver<String> variableResolver,
ClearTool ct,
AbstractHistoryAction action) |
void |
setLoadRules(String ldRls) |
protected void |
setNormalizedViewName(String normalizedViewName) |
protected void |
setNormalizedViewPath(String normalizedViewPath) |
void |
setViewStorage(ViewStorage viewStorage) |
void |
setWorkflow(UcmWorkflow workflow) |
boolean |
supportsPolling() |
_calcRevisionsFromBuild, _for, _for, all, calcRevisionsFromBuild, checkout, compareRemoteRevisionWith, createChangeLogParser, createEmptyChangeLog, createEmptyChangeLog, getApi, getBrowser, getDescriptor, getEffectiveBrowser, getKey, getModuleRoots, getModuleRoots, getType, guessBrowser, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion
public static final String CLEARCASE_VIEWNAME_ENVSTR
public static final String CLEARCASE_VIEWPATH_ENVSTR
public static final String CLEARCASE_VIEWTAG_ENVSTR
protected static final String REGEX_WHITESPACE
public AbstractClearCaseScm(String viewName, String mkviewOptionalParam, boolean filterOutDestroySubBranchEvent, boolean useUpdate, boolean rmviewonrename, String excludedRegions, boolean useDynamicView, String viewDrive, boolean extractLoadRules, String loadRules, boolean useOtherLoadRulesForPolling, String loadRulesForPolling, String multiSitePollBuffer, boolean createDynView, boolean freezeCode, boolean recreateView, String viewPath, AbstractClearCaseScm.ChangeSetLevel changeset, ViewStorage viewStorage)
public void buildEnvVars(hudson.model.AbstractBuild<?,?> build, Map<String,String> env)
buildEnvVars
in class hudson.scm.SCM
public hudson.scm.SCMRevisionState calcRevisionsFromBuild(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener taskListener) throws IOException, InterruptedException
calcRevisionsFromBuild
in class hudson.scm.SCM
IOException
InterruptedException
public hudson.scm.SCMRevisionState calcRevisionsFromPoll(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener taskListener) throws IOException, InterruptedException
IOException
InterruptedException
protected hudson.scm.SCMRevisionState createRevisionState(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.TaskListener taskListener, Date date) throws IOException, InterruptedException
IOException
InterruptedException
public boolean checkout(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.BuildListener listener, File changelogFile) throws IOException, InterruptedException
checkout
in class hudson.scm.SCM
IOException
InterruptedException
public Filter configureFilters(hudson.util.VariableResolver<String> variableResolver, hudson.model.AbstractBuild build, hudson.Launcher launcher) throws IOException, InterruptedException
IOException
InterruptedException
public ClearToolLauncher createClearToolLauncher(hudson.model.TaskListener listener, hudson.FilePath workspace, hudson.Launcher launcher)
listener
- listener to write command output toworkspace
- the workspace for the joblauncher
- actual launcher to launch commands withpublic String generateNormalizedViewName(hudson.model.AbstractBuild<?,?> build)
build
- the project to get the name fromAbstractClearCaseScm#generateNormalizedViewName(BuildVariableResolver, String)
public String generateNormalizedViewName(hudson.util.VariableResolver<String> variableResolver)
variableResolver
- An initialized build variable resolver.AbstractClearCaseScm#generateNormalizedViewName(BuildVariableResolver, String)
public String generateNormalizedViewName(hudson.util.VariableResolver<String> variableResolver, String modViewName)
Returns a normalized view name that will be used in cleartool commands.
It will replace :build
- the project to get the name from@Deprecated public String[] getBranchNames()
getBranchNames(VariableResolver)
insteadpublic abstract String[] getBranchNames(hudson.util.VariableResolver<String> variableResolver)
public hudson.model.Computer getBuildComputer(hudson.model.AbstractBuild<?,?> build)
public AbstractClearCaseScm.ChangeSetLevel getChangeset()
public hudson.model.Computer getCurrentComputer()
public String getExcludedRegions()
public String[] getExcludedRegionsNormalized()
public String getLoadRules()
public String getLoadRules(hudson.util.VariableResolver<String> variableResolver, boolean forPolling)
public String getLoadRulesForPolling()
public String getMkviewOptionalParam()
public hudson.FilePath getModuleRoot(hudson.FilePath workspace)
getModuleRoot
in class hudson.scm.SCM
public hudson.FilePath getModuleRoot(hudson.FilePath workspace, hudson.model.AbstractBuild build)
getModuleRoot
in class hudson.scm.SCM
public int getMultiSitePollBuffer()
public String getViewDrive()
public String getViewName()
public String getViewPath()
public String[] getViewPaths(hudson.util.VariableResolver<String> variableResolver, hudson.model.AbstractBuild build, hudson.Launcher launcher) throws IOException, InterruptedException
variableResolver
- [anb0s: HUDSON-8497]build
- TODOlauncher
- TODOInterruptedException
IOException
public String[] getViewPaths(hudson.util.VariableResolver<String> variableResolver, hudson.model.AbstractBuild build, hudson.Launcher launcher, boolean forPolling) throws IOException, InterruptedException
variableResolver
- [anb0s: HUDSON-8497]build
- TODOlauncher
- TODOforPolling
- used for polling?InterruptedException
IOException
public ViewStorage getViewStorage()
public UcmWorkflow getWorkflow()
public boolean isCreateDynView()
public boolean isExtractLoadRules()
public boolean isFilteringOutDestroySubBranchEvent()
Returns if the "Destroyed branch" event should be filtered out or not.
For more information about the boolean, see the full discussion at Nabble.
"Usually, CC admins have a CC trigger, fires on an uncheckout event, that destroys empty branches."
public boolean isFreezeCode()
public boolean isRecreateView()
public boolean isRemoveViewOnRename()
public boolean isUseDynamicView()
public boolean isUseOtherLoadRulesForPolling()
public boolean isUseUpdate()
public boolean processWorkspaceBeforeDeletion(hudson.model.AbstractProject<?,?> project, hudson.FilePath workspace, hudson.model.Node node) throws IOException, InterruptedException
processWorkspaceBeforeDeletion
in class hudson.scm.SCM
IOException
InterruptedException
public Object readResolve()
public boolean requiresWorkspaceForPolling()
requiresWorkspaceForPolling
in class hudson.scm.SCM
public void setLoadRules(String ldRls)
public void setViewStorage(ViewStorage viewStorage)
public void setWorkflow(UcmWorkflow workflow)
public boolean supportsPolling()
supportsPolling
in class hudson.scm.SCM
protected hudson.scm.PollingResult compareRemoteRevisionWith(hudson.model.AbstractProject<?,?> project, hudson.Launcher launcher, hudson.FilePath workspace, hudson.model.TaskListener listener, hudson.scm.SCMRevisionState baseline) throws IOException, InterruptedException
compareRemoteRevisionWith
in class hudson.scm.SCM
IOException
InterruptedException
protected String computeExtendedViewPath(hudson.util.VariableResolver<String> variableResolver, ClearTool ct)
protected abstract CheckoutAction createCheckOutAction(hudson.util.VariableResolver<String> variableResolver, ClearToolLauncher launcher, hudson.model.AbstractBuild<?,?> build) throws IOException, InterruptedException
launcher
- the command line launcherInterruptedException
IOException
protected ClearTool createClearTool(hudson.util.VariableResolver<String> variableResolver, ClearToolLauncher launcher)
protected abstract HistoryAction createHistoryAction(hudson.util.VariableResolver<String> variableResolver, ClearToolLauncher launcher, hudson.model.AbstractBuild<?,?> build, hudson.scm.SCMRevisionState baseline, boolean useRecurse) throws IOException, InterruptedException
variableResolver
- launcher
- the command line launcherbuild
- the current build if applicablebaseline
- the baseline for comparisonuseRecurse
- whether to use the -recurse option in cleartool to call lshistoryInterruptedException
IOException
protected abstract SaveChangeLogAction createSaveChangeLogAction(ClearToolLauncher launcher)
launcher
- the command line launcherprotected Date getBuildTime(hudson.model.Run<?,?> lastBuild)
protected String getNormalizedViewName()
protected String getNormalizedViewPath()
protected ViewStorage getViewStorageOrDefault()
protected boolean hasNewConfigSpec(hudson.util.VariableResolver<String> variableResolver, ClearToolLauncher cclauncher) throws IOException, InterruptedException
IOException
InterruptedException
protected void inspectConfigAction(hudson.util.VariableResolver<String> variableResolver, ClearToolLauncher launcher) throws IOException, InterruptedException
variableResolver
- launcher
- InterruptedException
IOException
protected boolean invalidRevisionState(hudson.scm.SCMRevisionState baseline)
protected abstract boolean isFirstBuild(hudson.scm.SCMRevisionState baseline)
protected void setChangeset(AbstractClearCaseScm.ChangeSetLevel changeset)
protected void setExtendedViewPath(hudson.util.VariableResolver<String> variableResolver, ClearTool ct, AbstractHistoryAction action)
protected void setNormalizedViewName(String normalizedViewName)
protected void setNormalizedViewPath(String normalizedViewPath)
Copyright © 2004-2021. All Rights Reserved.