Class AbstractRemoteGitRepoAwareProcessor

  • All Implemented Interfaces:
    DeploymentProcessor, InitializableByConfigBean, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware
    Direct Known Subclasses:
    GitPullProcessor, GitPushProcessor

    public abstract class AbstractRemoteGitRepoAwareProcessor
    extends AbstractMainDeploymentProcessor
    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 Detail

      • REMOTE_REPO_SSH_PRV_KEY_PATH_CONFIG_KEY

        protected static final String REMOTE_REPO_SSH_PRV_KEY_PATH_CONFIG_KEY
        See Also:
        Constant Field Values
      • REMOTE_REPO_SSH_PRV_KEY_PASSPHRASE_CONFIG_KEY

        protected static final String REMOTE_REPO_SSH_PRV_KEY_PASSPHRASE_CONFIG_KEY
        See Also:
        Constant Field Values
      • localRepoFolder

        protected File localRepoFolder
      • remoteRepoUrl

        protected String remoteRepoUrl
      • remoteRepoBranch

        protected String remoteRepoBranch
      • authenticationConfigurator

        protected org.craftercms.commons.git.auth.GitAuthenticationConfigurator authenticationConfigurator
      • authConfiguratorFactory

        protected org.craftercms.commons.git.utils.AuthConfiguratorFactory authConfiguratorFactory
    • Constructor Detail

      • AbstractRemoteGitRepoAwareProcessor

        public AbstractRemoteGitRepoAwareProcessor​(File localRepoFolder,
                                                   org.craftercms.commons.git.utils.AuthConfiguratorFactory authConfiguratorFactory)
    • Method Detail

      • 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 class AbstractDeploymentProcessor
        Parameters:
        config - the bean's configuration
        Throws:
        org.craftercms.commons.config.ConfigurationException - if there's configuration related exception
      • 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