Class BitbucketFunctions


public class BitbucketFunctions extends GitProviderFunctions
Utility functions used to get information from a Bitbucket payload
Since:
5.3
  • Constructor Details

    • BitbucketFunctions

      public BitbucketFunctions(LogFunctions pFLOG)
  • 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 payload
      pBitbucketUser - Valid Bitbucket user to make api calls with
      pBitbucketPassword - 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 payload
      pBitbucketUser - Valid Bitbucket user to make api calls with
      pBitbucketPassword - Bitbucket password
      pIgnoreTargetBranchMerge - 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 FlexCheckedException
      Build 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 payload
      pQueryParameters - 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 with
      pBitbucketPassword - Bitbucket password
      Throws:
      FlexCheckedException
    • buildProjects

      public void buildProjects(Object pPayload, Map<String,String> pQueryParameters, Boolean pCreateStreams, String pBitbucketUser, String pBitbucketPassword) throws FlexCheckedException
      Build 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 payload
      pQueryParameters - 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 with
      pBitbucketPassword - Bitbucket password
      Throws:
      FlexCheckedException
    • getGroovyKey

      public String getGroovyKey()
      Specified by:
      getGroovyKey in class BaseFunctions