Package hudson.plugins.dimensionsscm
Class DimensionsSCM
- java.lang.Object
-
- hudson.scm.SCM
-
- hudson.plugins.dimensionsscm.DimensionsSCM
-
- All Implemented Interfaces:
ExtensionPoint,Describable<SCM>,Serializable
public class DimensionsSCM extends SCM implements Serializable
An SCM that can poll, browse and update from Dimensions CM.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDimensionsSCM.DescriptorImplImplementation class for Dimensions CM SCM plugin.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static DimensionsSCM.DescriptorImplDM_DESCRIPTOR-
Fields inherited from class hudson.scm.SCM
PERMISSIONS, TAG
-
-
Constructor Summary
Constructors Constructor Description DimensionsSCM(String project, String credentialsType, String userName, String password, String pluginServer, String userServer, String keystoreServer, String pluginDatabase, String userDatabase, String keystoreDatabase, String keystorePath, String certificateAlias, String credentialsId, String certificatePassword, String keystorePassword, String certificatePath, String remoteCertificatePassword, boolean secureAgentAuth)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildEnvVars(AbstractBuild<?,?> build, Map<String,String> env)Build up environment variables for build support.SCMRevisionStatecalcRevisionsFromBuild(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener)Has the repository had any changes since last build?voidcheckout(Run<?,?> build, Launcher launcher, FilePath workspace, TaskListener listener, File changelogFile, SCMRevisionState baseln)Checkout method for the plugin.PollingResultcompareRemoteRevisionWith(Job<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline)Has the repository had any changes?ChangeLogParsercreateChangeLogParser()Create a log parser object.PathMatchercreatePathMatcher()Creates path matcher to ignore changes on certain paths.static com.cloudbees.plugins.credentials.common.UsernamePasswordCredentialscredentialsFromId(String credentialsId, Item item)voidfillInCredentials(Run<?,?> run)Because we can't use the Credentials API from a remote agent, you should use this method to copy the username and password out of the Credentials into the appropriate fields (using Credentials API) _before_ remoting.DimensionsSCMRepositoryBrowsergetBrowser()StringgetCertificateAlias()Gets the certificate alias.StringgetCertificatePassword()Gets the certificate password as String.SecretgetCertificatePasswordSecret()Gets the certificate password as Secret object.StringgetCertificatePath()Gets the remote certificate path as String.StringgetCredentialsId()Gets selected credentialsId for the projectStringgetCredentialsType()Gets the credentials type.StringgetDatabase()Gets the database name for the connection.DimensionsSCM.DescriptorImplgetDescriptor()Return an SCM descriptor.StringgetEol()Gets the eol value.List<StringVarStorage>getFolders()Gets the project paths to monitor.StringgetKey()StringgetKeystoreDatabase()StringgetKeystorePassword()Gets the keystore password as String.SecretgetKeystorePasswordSecret()Gets the keystore password as Secret object.StringgetKeystorePath()Gets the keystore path.StringgetKeystoreServer()StringgetParameterFromBuild(org.jenkinsci.plugins.workflow.job.WorkflowRun build, String parameterName)Get build parameters for WorkflowRunStringgetPassword()Gets the password for the connection (can be null).StringgetPasswordNN()Gets the password for the connection (not null).List<StringVarStorage>getPathsToExclude()Gets paths excluded from monitoring.StringgetPermissions()Gets the permissions string.StringgetPluginDatabase()StringgetPluginServer()StringgetProject()Gets the unexpanded project name for the connection.StringgetProjectName(Run<?,?> run, TaskListener log)Gets the expanded project name for the connection.StringgetProjectVersion(Run<?,?> run, TaskListener log)Gets the expanded project name and version for the connection.StringgetRemoteCertificatePassword()Gets the remote certificate password as String.SecretgetRemoteCertificatePasswordSecret()Gets the remote certificate password as Secret instance.StringgetServer()Gets the server name for the connection.StringgetTimeZone()Gets the time zone for the connection.StringgetUserDatabase()StringgetUserName()Gets the user ID for the connection.StringgetUserServer()StringgetWebUrl()Gets the web URL for the connection.RepositoryBrowser<?>guessBrowser()booleanisCanJobDelete()Gets the delete flag.booleanisCanJobExpand()Gets the expand flag.booleanisCanJobForce()Gets the force flag.booleanisCanJobNoMetadata()Gets the no metadata flag.booleanisCanJobNoTouch()Gets the no touch flag.booleanisCanJobRevert()Gets the revert flag.booleanisCanJobUpdate()Gets the update flag.booleanisChecked(String type)booleanisSecureAgentAuth()Check if need perform secure auth for remote.booleanprocessWorkspaceBeforeDeletion(Job<?,?> project, FilePath workspace, Node node)Okay to clear the area?booleanrequiresWorkspaceForPolling()Does this SCM plugin require a workspace for polling?voidsetCanJobDelete(boolean canJobDelete)voidsetCanJobExpand(boolean canJobExpand)voidsetCanJobForce(boolean canJobForce)voidsetCanJobNoMetadata(boolean canJobNoMetadata)voidsetCanJobNoTouch(boolean canJobNoTouch)voidsetCanJobRevert(boolean canJobRevert)voidsetCanJobUpdate(boolean canJobUpdate)voidsetEol(String eol)voidsetFolders(List<StringVarStorage> folders)voidsetPathsToExclude(List<StringVarStorage> pathsToExclude)voidsetPermissions(String permissions)voidsetTimeZone(String timeZone)voidsetWebUrl(String webUrl)booleansupportsPolling()Does this SCM plugin support polling?-
Methods inherited from class hudson.scm.SCM
_calcRevisionsFromBuild, _for, _for, all, buildEnvironment, calcRevisionsFromBuild, checkout, compareRemoteRevisionWith, createEmptyChangeLog, createEmptyChangeLog, getApi, getEffectiveBrowser, getModuleRoot, getModuleRoot, getModuleRoots, getModuleRoots, getType, nullify, poll, pollChanges, postCheckout, postCheckout, processWorkspaceBeforeDeletion
-
-
-
-
Field Detail
-
DM_DESCRIPTOR
@Extension public static final DimensionsSCM.DescriptorImpl DM_DESCRIPTOR
-
-
Constructor Detail
-
DimensionsSCM
@DataBoundConstructor public DimensionsSCM(String project, String credentialsType, String userName, String password, String pluginServer, String userServer, String keystoreServer, String pluginDatabase, String userDatabase, String keystoreDatabase, String keystorePath, String certificateAlias, String credentialsId, String certificatePassword, String keystorePassword, String certificatePath, String remoteCertificatePassword, boolean secureAgentAuth)
-
-
Method Detail
-
credentialsFromId
public static com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials credentialsFromId(String credentialsId, Item item)
-
fillInCredentials
public void fillInCredentials(Run<?,?> run)
Because we can't use the Credentials API from a remote agent, you should use this method to copy the username and password out of the Credentials into the appropriate fields (using Credentials API) _before_ remoting.
-
isChecked
public boolean isChecked(String type)
-
getProject
public String getProject()
Gets the unexpanded project name for the connection.- Returns:
- the project spec
-
getProjectName
public String getProjectName(Run<?,?> run, TaskListener log)
Gets the expanded project name for the connection. Any variables in the project value will be expanded.- Returns:
- the project spec without a trailing version number (if there is one).
-
getCredentialsId
public String getCredentialsId()
Gets selected credentialsId for the project
-
getProjectVersion
public String getProjectVersion(Run<?,?> run, TaskListener log)
Gets the expanded project name and version for the connection. Any variables in the project value will be expanded.- Returns:
- the project spec including its trailing version (if there is one).
-
getPermissions
public String getPermissions()
Gets the permissions string.
-
getEol
public String getEol()
Gets the eol value.
-
getFolders
public List<StringVarStorage> getFolders()
Gets the project paths to monitor.
-
getPathsToExclude
public List<StringVarStorage> getPathsToExclude()
Gets paths excluded from monitoring.
-
getUserName
public String getUserName()
Gets the user ID for the connection.
-
getPasswordNN
public String getPasswordNN()
Gets the password for the connection (not null).
-
getPassword
public String getPassword()
Gets the password for the connection (can be null).
-
getCertificatePassword
public String getCertificatePassword()
Gets the certificate password as String.
-
getCertificatePasswordSecret
public Secret getCertificatePasswordSecret()
Gets the certificate password as Secret object.
-
getKeystorePasswordSecret
public Secret getKeystorePasswordSecret()
Gets the keystore password as Secret object.
-
getKeystorePassword
public String getKeystorePassword()
Gets the keystore password as String.
-
getRemoteCertificatePasswordSecret
public Secret getRemoteCertificatePasswordSecret()
Gets the remote certificate password as Secret instance.
-
getRemoteCertificatePassword
public String getRemoteCertificatePassword()
Gets the remote certificate password as String.
-
getCertificatePath
public String getCertificatePath()
Gets the remote certificate path as String.
-
isSecureAgentAuth
public boolean isSecureAgentAuth()
Check if need perform secure auth for remote.- Returns:
- secure auth
-
getServer
public String getServer()
Gets the server name for the connection.
-
getUserServer
public String getUserServer()
-
getPluginServer
public String getPluginServer()
-
getKeystoreServer
public String getKeystoreServer()
-
getDatabase
public String getDatabase()
Gets the database name for the connection.
-
getUserDatabase
public String getUserDatabase()
-
getPluginDatabase
public String getPluginDatabase()
-
getKeystoreDatabase
public String getKeystoreDatabase()
-
getTimeZone
public String getTimeZone()
Gets the time zone for the connection.
-
getWebUrl
public String getWebUrl()
Gets the web URL for the connection.
-
getCredentialsType
public String getCredentialsType()
Gets the credentials type.
-
getKeystorePath
public String getKeystorePath()
Gets the keystore path.
-
getCertificateAlias
public String getCertificateAlias()
Gets the certificate alias.
-
isCanJobExpand
public boolean isCanJobExpand()
Gets the expand flag.
-
isCanJobNoMetadata
public boolean isCanJobNoMetadata()
Gets the no metadata flag.
-
isCanJobNoTouch
public boolean isCanJobNoTouch()
Gets the no touch flag.
-
isCanJobUpdate
public boolean isCanJobUpdate()
Gets the update flag.
-
isCanJobDelete
public boolean isCanJobDelete()
Gets the delete flag.
-
isCanJobForce
public boolean isCanJobForce()
Gets the force flag.
-
isCanJobRevert
public boolean isCanJobRevert()
Gets the revert flag.
-
setFolders
@DataBoundSetter public void setFolders(List<StringVarStorage> folders)
-
setPathsToExclude
@DataBoundSetter public void setPathsToExclude(List<StringVarStorage> pathsToExclude)
-
setPermissions
@DataBoundSetter public void setPermissions(String permissions)
-
setEol
@DataBoundSetter public void setEol(String eol)
-
setTimeZone
@DataBoundSetter public void setTimeZone(String timeZone)
-
setWebUrl
@DataBoundSetter public void setWebUrl(String webUrl)
-
setCanJobUpdate
@DataBoundSetter public void setCanJobUpdate(boolean canJobUpdate)
-
setCanJobDelete
@DataBoundSetter public void setCanJobDelete(boolean canJobDelete)
-
setCanJobForce
@DataBoundSetter public void setCanJobForce(boolean canJobForce)
-
setCanJobRevert
@DataBoundSetter public void setCanJobRevert(boolean canJobRevert)
-
setCanJobExpand
@DataBoundSetter public void setCanJobExpand(boolean canJobExpand)
-
setCanJobNoMetadata
@DataBoundSetter public void setCanJobNoMetadata(boolean canJobNoMetadata)
-
setCanJobNoTouch
@DataBoundSetter public void setCanJobNoTouch(boolean canJobNoTouch)
-
requiresWorkspaceForPolling
public boolean requiresWorkspaceForPolling()
Does this SCM plugin require a workspace for polling?- Overrides:
requiresWorkspaceForPollingin classSCM
-
supportsPolling
public boolean supportsPolling()
Does this SCM plugin support polling?- Overrides:
supportsPollingin classSCM
-
buildEnvVars
public void buildEnvVars(AbstractBuild<?,?> build, Map<String,String> env)
Build up environment variables for build support.- Overrides:
buildEnvVarsin classSCM
-
getBrowser
public DimensionsSCMRepositoryBrowser getBrowser()
- Overrides:
getBrowserin classSCM
-
guessBrowser
@CheckForNull public RepositoryBrowser<?> guessBrowser()
- Overrides:
guessBrowserin classSCM
-
getParameterFromBuild
public String getParameterFromBuild(org.jenkinsci.plugins.workflow.job.WorkflowRun build, String parameterName)
Get build parameters for WorkflowRun
-
checkout
public void checkout(@NonNull Run<?,?> build, @NonNull Launcher launcher, @NonNull FilePath workspace, @NonNull TaskListener listener, @CheckForNull File changelogFile, @CheckForNull SCMRevisionState baseln) throws IOException, InterruptedExceptionCheckout method for the plugin.- Overrides:
checkoutin classSCM- Throws:
IOExceptionInterruptedException
-
calcRevisionsFromBuild
public SCMRevisionState calcRevisionsFromBuild(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener)
Has the repository had any changes since last build?- Overrides:
calcRevisionsFromBuildin classSCM
-
compareRemoteRevisionWith
public PollingResult compareRemoteRevisionWith(Job<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException, InterruptedException
Has the repository had any changes?- Overrides:
compareRemoteRevisionWithin classSCM- Throws:
IOExceptionInterruptedException
-
processWorkspaceBeforeDeletion
public boolean processWorkspaceBeforeDeletion(@NonNull Job<?,?> project, @NonNull FilePath workspace, @NonNull Node node) throws IOException, InterruptedExceptionOkay to clear the area?- Overrides:
processWorkspaceBeforeDeletionin classSCM- Throws:
IOExceptionInterruptedException
-
createPathMatcher
public PathMatcher createPathMatcher()
Creates path matcher to ignore changes on certain paths.- Returns:
- path matcher
-
createChangeLogParser
public ChangeLogParser createChangeLogParser()
Create a log parser object.- Specified by:
createChangeLogParserin classSCM
-
getDescriptor
public DimensionsSCM.DescriptorImpl getDescriptor()
Return an SCM descriptor.- Specified by:
getDescriptorin interfaceDescribable<SCM>- Overrides:
getDescriptorin classSCM
-
-