Class GitResourceService
java.lang.Object
fr.paris.lutece.plugins.releaser.service.git.GitResourceService
- All Implemented Interfaces:
IVCSResourceService
GitResourceService.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckoutBranch(WorkflowReleaseContext context, String strBranch, Locale locale) Checkout the given branch.doCloneRepository(WorkflowReleaseContext context, String strLogin, String strPassword) Do clone repository.Fetch the pom.xml content from a repositorygetLastRelease(Site site, String strGitLogin, String strGitPwd) Gets the last release found in the Git repository.voidrollbackRelease(WorkflowReleaseContext context, Locale locale) Rollback release.voidupdateBranch(WorkflowReleaseContext context, String strBranch, Locale locale, String strMessage) Commit and push the local working tree on the given branch.voidupdateMasterBranch(WorkflowReleaseContext context, String strMasterBranch, Locale locale) Update master branch.
-
Constructor Details
-
GitResourceService
public GitResourceService()
-
-
Method Details
-
fetchPom
Fetch the pom.xml content from a repository- Specified by:
fetchPomin interfaceIVCSResourceService- Parameters:
site- the sitestrGitLogin- the str git loginstrGitPwd- the str git pwd- Returns:
- The POM content
-
getLastRelease
Gets the last release found in the Git repository.- Specified by:
getLastReleasein interfaceIVCSResourceService- Parameters:
site- the sitestrGitLogin- the str git loginstrGitPwd- the str git pwd- Returns:
- The version if found otherwise null
-
doCloneRepository
public String doCloneRepository(WorkflowReleaseContext context, String strLogin, String strPassword) Do clone repository.- Specified by:
doCloneRepositoryin interfaceIVCSResourceService- Parameters:
context- the contextstrLogin- the str loginstrPassword- the str password- Returns:
- the string
-
updateBranch
public void updateBranch(WorkflowReleaseContext context, String strBranch, Locale locale, String strMessage) Commit and push the local working tree on the given branch.- Specified by:
updateBranchin interfaceIVCSResourceService- Parameters:
context- the contextstrBranch- the branch to updatelocale- the localestrMessage- the commit message
-
updateMasterBranch
public void updateMasterBranch(WorkflowReleaseContext context, String strMasterBranch, Locale locale) Update master branch.- Specified by:
updateMasterBranchin interfaceIVCSResourceService- Parameters:
context- the contextlocale- the localestrMasterBranch- the target master* branch (e.g. "master", "master_core7")
-
rollbackRelease
Rollback release.- Specified by:
rollbackReleasein interfaceIVCSResourceService- Parameters:
context- the contextlocale- the locale
-
checkoutBranch
Checkout the given branch.- Specified by:
checkoutBranchin interfaceIVCSResourceService- Parameters:
context- the contextstrBranch- the branch to checkoutlocale- the locale
-