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
FieldsModifier and TypeFieldDescriptionprotected org.craftercms.commons.git.utils.AuthConfiguratorFactoryprotected org.craftercms.commons.git.auth.GitAuthenticationConfiguratorprotected Fileprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected Stringprotected StringFields inherited from class org.craftercms.deployer.impl.processors.AbstractMainDeploymentProcessor
FAIL_DEPLOYMENT_CONFIG_KEY, failDeploymentOnFailureFields inherited from class org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
alwaysRun, env, excludeFiles, includeFiles, JUMPING_TO_PARAM_NAME, jumpTo, label, name, siteName, targetId -
Constructor Summary
ConstructorsConstructorDescriptionAbstractRemoteGitRepoAwareProcessor(File localRepoFolder, org.craftercms.commons.git.utils.AuthConfiguratorFactory authConfiguratorFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.craftercms.commons.git.auth.GitAuthenticationConfiguratorcreateAuthenticationConfigurator(org.apache.commons.configuration2.Configuration config, String repoUrl) protected voidAllows extending classes perform any custom cleanupprotected voiddoInit(org.apache.commons.configuration2.Configuration config) Allows extending classes perform any custom initializationprotected org.eclipse.jgit.api.Gitprotected booleanshouldExecute(Deployment deployment, ChangeSet filteredChangeSet) Indicates if the processor should be executed for the givenDeploymentandChangeSetMethods inherited from class org.craftercms.deployer.impl.processors.AbstractMainDeploymentProcessor
doExecute, doMainProcess, failDeploymentOnProcessorFailure, initMethods inherited from class org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
destroy, execute, getDeploymentParam, 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:AbstractDeploymentProcessorAllows extending classes perform any custom initialization- Specified by:
doInitin classAbstractDeploymentProcessor- Parameters:
config- the bean's configuration- Throws:
org.craftercms.commons.config.ConfigurationException- if there's configuration related exception
-
doDestroy
Description copied from class:AbstractDeploymentProcessorAllows extending classes perform any custom cleanup- Specified by:
doDestroyin classAbstractDeploymentProcessor- Throws:
DeployerException- if an error occurs
-
shouldExecute
Description copied from class:AbstractMainDeploymentProcessorIndicates if the processor should be executed for the givenDeploymentandChangeSet- Overrides:
shouldExecutein classAbstractMainDeploymentProcessor- Parameters:
deployment- theDeploymentto checkfilteredChangeSet- theChangeSetto 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
-