Class AbstractRemoteGitRepoAwareProcessor
java.lang.Object
org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
org.craftercms.deployer.impl.processors.AbstractMainDeploymentProcessor
org.craftercms.deployer.impl.processors.git.AbstractRemoteGitRepoAwareProcessor
- All Implemented Interfaces:
DeploymentProcessor
,InitializableByConfigBean
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
GitPullProcessor
,GitPushProcessor
Base class for processors that work against a remote repo. It basically provides the code that is used to
authenticate to the remote repository. A processor instance can be configured with the following YAML
properties:
- remoteRepo.url: The URL of the remote Git repo.
- remoteRepo.branch: The branch of the remote Git repo.
- remoteRepo.username: The username for authentication with the remote Git repo. Not needed when SSH with RSA key pair authentication is used.
- remoteRepo.password: The password for authentication with the remote Git repo. Not needed when SSH with RSA key pair authentication is used.
- remoteRepo.ssh.privateKey.path: The SSH private key path, used only with SSH with RSA key pair authentication.
- remoteRepo.ssh.privateKey.passphrase: The SSH private key passphrase, used only with SSH withRSA key pair authentication.
- Author:
- avasquez
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.craftercms.commons.git.utils.AuthConfiguratorFactory
protected org.craftercms.commons.git.auth.GitAuthenticationConfigurator
protected File
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected String
protected String
Fields inherited from class org.craftercms.deployer.impl.processors.AbstractMainDeploymentProcessor
FAIL_DEPLOYMENT_CONFIG_KEY, failDeploymentOnFailure
Fields inherited from class org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
alwaysRun, env, excludeFiles, includeFiles, JUMPING_TO_PARAM_NAME, jumpTo, label, name, siteName, targetId
-
Constructor Summary
ConstructorDescriptionAbstractRemoteGitRepoAwareProcessor
(File localRepoFolder, org.craftercms.commons.git.utils.AuthConfiguratorFactory authConfiguratorFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.craftercms.commons.git.auth.GitAuthenticationConfigurator
createAuthenticationConfigurator
(org.apache.commons.configuration2.Configuration config, String repoUrl) protected void
Allows extending classes perform any custom cleanupprotected void
doInit
(org.apache.commons.configuration2.Configuration config) Allows extending classes perform any custom initializationprotected org.eclipse.jgit.api.Git
protected boolean
shouldExecute
(Deployment deployment, ChangeSet filteredChangeSet) Indicates if the processor should be executed for the givenDeployment
andChangeSet
Methods inherited from class org.craftercms.deployer.impl.processors.AbstractMainDeploymentProcessor
doExecute, doMainProcess, failDeploymentOnProcessorFailure, init
Methods inherited from class org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
destroy, execute, getFilteredChangeSet, isJumpToActive, isPostDeployment, setBeanName, setEnv, setSiteName, setTargetId, shouldIncludeFile, startJumpTo, supportsMode
-
Field Details
-
REMOTE_REPO_URL_CONFIG_KEY
- See Also:
-
REMOTE_REPO_BRANCH_CONFIG_KEY
- See Also:
-
REMOTE_REPO_USERNAME_CONFIG_KEY
- See Also:
-
REMOTE_REPO_PASSWORD_CONFIG_KEY
- See Also:
-
REMOTE_REPO_SSH_PRV_KEY_PATH_CONFIG_KEY
- See Also:
-
REMOTE_REPO_SSH_PRV_KEY_PASSPHRASE_CONFIG_KEY
- See Also:
-
localRepoFolder
-
remoteRepoUrl
-
remoteRepoBranch
-
authenticationConfigurator
protected org.craftercms.commons.git.auth.GitAuthenticationConfigurator authenticationConfigurator -
authConfiguratorFactory
protected org.craftercms.commons.git.utils.AuthConfiguratorFactory authConfiguratorFactory
-
-
Constructor Details
-
AbstractRemoteGitRepoAwareProcessor
public AbstractRemoteGitRepoAwareProcessor(File localRepoFolder, org.craftercms.commons.git.utils.AuthConfiguratorFactory authConfiguratorFactory)
-
-
Method Details
-
doInit
protected void doInit(org.apache.commons.configuration2.Configuration config) throws org.craftercms.commons.config.ConfigurationException Description copied from class:AbstractDeploymentProcessor
Allows extending classes perform any custom initialization- Specified by:
doInit
in classAbstractDeploymentProcessor
- Parameters:
config
- the bean's configuration- Throws:
org.craftercms.commons.config.ConfigurationException
- if there's configuration related exception
-
doDestroy
Description copied from class:AbstractDeploymentProcessor
Allows extending classes perform any custom cleanup- Specified by:
doDestroy
in classAbstractDeploymentProcessor
- Throws:
DeployerException
- if an error occurs
-
shouldExecute
Description copied from class:AbstractMainDeploymentProcessor
Indicates if the processor should be executed for the givenDeployment
andChangeSet
- Overrides:
shouldExecute
in classAbstractMainDeploymentProcessor
- Parameters:
deployment
- theDeployment
to checkfilteredChangeSet
- theChangeSet
to check- Returns:
- true if the processor should be executed
-
createAuthenticationConfigurator
protected org.craftercms.commons.git.auth.GitAuthenticationConfigurator createAuthenticationConfigurator(org.apache.commons.configuration2.Configuration config, String repoUrl) throws org.craftercms.commons.config.ConfigurationException - Throws:
org.craftercms.commons.config.ConfigurationException
-
openLocalRepository
- Throws:
DeployerException
-