Class BitbucketFunctions
java.lang.Object
flexagon.fd.services.groovy.functions.BaseFunctions
flexagon.fd.services.groovy.functions.GitProviderFunctions
flexagon.fd.services.groovy.functions.BitbucketFunctions
Utility functions used to get information from a Bitbucket payload
- Since:
- 5.3
-
Field Summary
Fields inherited from class flexagon.fd.services.groovy.functions.BaseFunctions
mFLOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildPackages(Object pPayload, Map<String, String> pQueryParameters, Boolean pCreateStreams, String pBitbucketUser, String pBitbucketPassword) Build Packages using the given projectId and/or packageName in the query parameters or finding packages to build from the payload.voidbuildProjects(Object pPayload, Map<String, String> pQueryParameters, Boolean pCreateStreams, String pBitbucketUser, String pBitbucketPassword) Build Projects using the given projectId in the query parameters or finding projects to build from the payload.getChangeLogs(Object pPayload, String pBitbucketUser, String pBitbucketPassword) Finds FlexDeploy change logs from a Bitbucket payload.getChangeLogs(Object pPayload, String pBitbucketUser, String pBitbucketPassword, boolean pIgnoreTargetBranchMerge) Finds FlexDeploy change logs from a Bitbucket payload.Methods inherited from class flexagon.fd.services.groovy.functions.GitProviderFunctions
buildPackages, buildProjects, cleanup, getFlexDeployFunctions, getJsonObjectFromPayloadMethods inherited from class flexagon.fd.services.groovy.functions.BaseFunctions
captureSecureValues, captureSecureValuesForLogFunction, decryptIntegrationInstance, doSimpleGet, findIntegrationInstanceByCode, getBinding, getLogFunctions, getServerBaseUrl, setBinding
-
Constructor Details
-
BitbucketFunctions
-
-
Method Details
-
getChangeLogs
public PollingResult getChangeLogs(Object pPayload, String pBitbucketUser, String pBitbucketPassword) throws FlexCheckedException Finds FlexDeploy change logs from a Bitbucket payload. Return object can be passed to other FlexDeploy functions to improve performance. Bitbucket does not send changed files in the push event, but that information is available via the diffstat api. This function will use that api and as such requires a valid user/password to make the api call.- Parameters:
pPayload- JSON payload from a Bitbucket push event. This MUST be the push event payloadpBitbucketUser- Valid Bitbucket user to make api calls withpBitbucketPassword- Bitbucket password- Returns:
- A PollingResult object containing information such as change logs, revisions and committer
- Throws:
FlexCheckedException
-
getChangeLogs
public PollingResult getChangeLogs(Object pPayload, String pBitbucketUser, String pBitbucketPassword, boolean pIgnoreTargetBranchMerge) throws FlexCheckedException Finds FlexDeploy change logs from a Bitbucket payload. Return object can be passed to other FlexDeploy functions to improve performance. Bitbucket does not send changed files in the push event, but that information is available via the diffstat api. This function will use that api and as such requires a valid user/password to make the api call.- Parameters:
pPayload- JSON payload from a Bitbucket push event. This MUST be the push event payloadpBitbucketUser- Valid Bitbucket user to make api calls withpBitbucketPassword- Bitbucket passwordpIgnoreTargetBranchMerge- Exclude commits that were merged from the target branch into this branch. When using git flow this will ignore merges done from the target branch 'develop' into your feature branch. Default value is true- Returns:
- A PollingResult object containing information such as change logs, revisions and committer
- Throws:
FlexCheckedException
-
buildPackages
public void buildPackages(Object pPayload, Map<String, String> pQueryParameters, Boolean pCreateStreams, String pBitbucketUser, String pBitbucketPassword) throws FlexCheckedExceptionBuild Packages using the given projectId and/or packageName in the query parameters or finding packages to build from the payload.- Parameters:
pPayload- Json payload from Bitbucket push event. This MUST be the push event payloadpQueryParameters- Query Parameters from Bitbucket push event. This must be the push event payload.pCreateStreams- Should streams be created if not found on the projects?pBitbucketUser- Valid Bitbucket user to make api calls withpBitbucketPassword- Bitbucket password- Throws:
FlexCheckedException
-
buildProjects
public void buildProjects(Object pPayload, Map<String, String> pQueryParameters, Boolean pCreateStreams, String pBitbucketUser, String pBitbucketPassword) throws FlexCheckedExceptionBuild Projects using the given projectId in the query parameters or finding projects to build from the payload.- Parameters:
pPayload- Json payload from Bitbucket push event. This MUST be the push event payloadpQueryParameters- Query Parameters from Bitbucket push event. This must be the push event payload.pCreateStreams- Should streams be created if not found on the projects?pBitbucketUser- Valid Bitbucket user to make api calls withpBitbucketPassword- Bitbucket password- Throws:
FlexCheckedException
-
getGroovyKey
- Specified by:
getGroovyKeyin classBaseFunctions
-