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 class
DimensionsSCM.DescriptorImpl
Implementation 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.DescriptorImpl
DM_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 void
buildEnvVars(AbstractBuild<?,?> build, Map<String,String> env)
Build up environment variables for build support.SCMRevisionState
calcRevisionsFromBuild(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener)
Has the repository had any changes since last build?void
checkout(Run<?,?> build, Launcher launcher, FilePath workspace, TaskListener listener, File changelogFile, SCMRevisionState baseln)
Checkout method for the plugin.PollingResult
compareRemoteRevisionWith(Job<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline)
Has the repository had any changes?ChangeLogParser
createChangeLogParser()
Create a log parser object.PathMatcher
createPathMatcher()
Creates path matcher to ignore changes on certain paths.static com.cloudbees.plugins.credentials.common.UsernamePasswordCredentials
credentialsFromId(String credentialsId, Item item)
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.DimensionsSCMRepositoryBrowser
getBrowser()
String
getCertificateAlias()
Gets the certificate alias.String
getCertificatePassword()
Gets the certificate password as String.Secret
getCertificatePasswordSecret()
Gets the certificate password as Secret object.String
getCertificatePath()
Gets the remote certificate path as String.String
getCredentialsId()
Gets selected credentialsId for the projectString
getCredentialsType()
Gets the credentials type.String
getDatabase()
Gets the database name for the connection.DimensionsSCM.DescriptorImpl
getDescriptor()
Return an SCM descriptor.String
getEol()
Gets the eol value.List<StringVarStorage>
getFolders()
Gets the project paths to monitor.String
getKey()
String
getKeystoreDatabase()
String
getKeystorePassword()
Gets the keystore password as String.Secret
getKeystorePasswordSecret()
Gets the keystore password as Secret object.String
getKeystorePath()
Gets the keystore path.String
getKeystoreServer()
String
getParameterFromBuild(org.jenkinsci.plugins.workflow.job.WorkflowRun build, String parameterName)
Get build parameters for WorkflowRunString
getPassword()
Gets the password for the connection (can be null).String
getPasswordNN()
Gets the password for the connection (not null).List<StringVarStorage>
getPathsToExclude()
Gets paths excluded from monitoring.String
getPermissions()
Gets the permissions string.String
getPluginDatabase()
String
getPluginServer()
String
getProject()
Gets the unexpanded project name for the connection.String
getProjectName(Run<?,?> run, TaskListener log)
Gets the expanded project name for the connection.String
getProjectVersion(Run<?,?> run, TaskListener log)
Gets the expanded project name and version for the connection.String
getRemoteCertificatePassword()
Gets the remote certificate password as String.Secret
getRemoteCertificatePasswordSecret()
Gets the remote certificate password as Secret instance.String
getServer()
Gets the server name for the connection.String
getTimeZone()
Gets the time zone for the connection.String
getUserDatabase()
String
getUserName()
Gets the user ID for the connection.String
getUserServer()
String
getWebUrl()
Gets the web URL for the connection.RepositoryBrowser<?>
guessBrowser()
boolean
isCanJobDelete()
Gets the delete flag.boolean
isCanJobExpand()
Gets the expand flag.boolean
isCanJobForce()
Gets the force flag.boolean
isCanJobNoMetadata()
Gets the no metadata flag.boolean
isCanJobNoTouch()
Gets the no touch flag.boolean
isCanJobRevert()
Gets the revert flag.boolean
isCanJobUpdate()
Gets the update flag.boolean
isChecked(String type)
boolean
isSecureAgentAuth()
Check if need perform secure auth for remote.boolean
processWorkspaceBeforeDeletion(Job<?,?> project, FilePath workspace, Node node)
Okay to clear the area?boolean
requiresWorkspaceForPolling()
Does this SCM plugin require a workspace for polling?void
setCanJobDelete(boolean canJobDelete)
void
setCanJobExpand(boolean canJobExpand)
void
setCanJobForce(boolean canJobForce)
void
setCanJobNoMetadata(boolean canJobNoMetadata)
void
setCanJobNoTouch(boolean canJobNoTouch)
void
setCanJobRevert(boolean canJobRevert)
void
setCanJobUpdate(boolean canJobUpdate)
void
setEol(String eol)
void
setFolders(List<StringVarStorage> folders)
void
setPathsToExclude(List<StringVarStorage> pathsToExclude)
void
setPermissions(String permissions)
void
setTimeZone(String timeZone)
void
setWebUrl(String webUrl)
boolean
supportsPolling()
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:
requiresWorkspaceForPolling
in classSCM
-
supportsPolling
public boolean supportsPolling()
Does this SCM plugin support polling?- Overrides:
supportsPolling
in classSCM
-
buildEnvVars
public void buildEnvVars(AbstractBuild<?,?> build, Map<String,String> env)
Build up environment variables for build support.- Overrides:
buildEnvVars
in classSCM
-
getBrowser
public DimensionsSCMRepositoryBrowser getBrowser()
- Overrides:
getBrowser
in classSCM
-
guessBrowser
@CheckForNull public RepositoryBrowser<?> guessBrowser()
- Overrides:
guessBrowser
in 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, InterruptedException
Checkout method for the plugin.- Overrides:
checkout
in classSCM
- Throws:
IOException
InterruptedException
-
calcRevisionsFromBuild
public SCMRevisionState calcRevisionsFromBuild(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener)
Has the repository had any changes since last build?- Overrides:
calcRevisionsFromBuild
in 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:
compareRemoteRevisionWith
in classSCM
- Throws:
IOException
InterruptedException
-
processWorkspaceBeforeDeletion
public boolean processWorkspaceBeforeDeletion(@NonNull Job<?,?> project, @NonNull FilePath workspace, @NonNull Node node) throws IOException, InterruptedException
Okay to clear the area?- Overrides:
processWorkspaceBeforeDeletion
in classSCM
- Throws:
IOException
InterruptedException
-
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:
createChangeLogParser
in classSCM
-
getDescriptor
public DimensionsSCM.DescriptorImpl getDescriptor()
Return an SCM descriptor.- Specified by:
getDescriptor
in interfaceDescribable<SCM>
- Overrides:
getDescriptor
in classSCM
-
-