Class BitbucketServerFunctions


public class BitbucketServerFunctions extends GitProviderFunctions
Utility functions used to get information from a Bitbucket Server payload
Since:
5.3.0.1
  • Constructor Details

    • BitbucketServerFunctions

      public BitbucketServerFunctions(LogFunctions pFLOG)
  • Method Details

    • getChangeLogs

      public PollingResult getChangeLogs(Object pPayload, String pBitbucketUser, String pBitbucketPassword) throws FlexCheckedException
      Finds FlexDeploy change logs from a Bitbucket Server payload. Return object can be passed to other FlexDeploy functions to improve performance. Bitbucket Server sends minimal information in the push event and this function will make several other api calls to retrieve all necessary information.
      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 - Password or Personal Access Token for the user
      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 Server payload. Return object can be passed to other FlexDeploy functions to improve performance. Bitbucket Server sends minimal information in the push event and this function will make several other api calls to retrieve all necessary information.
      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 - Password or Personal Access Token for the user
      pIgnoreTargetBranchMerge - Exclude merge commits on your target branch. Default value is true and false should only be used in very rare cases.
      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, Integer pLimit) throws FlexCheckedException
      Finds FlexDeploy change logs from a Bitbucket Server payload. Return object can be passed to other FlexDeploy functions to improve performance. Bitbucket Server sends minimal information in the push event and this function will make several other api calls to retrieve all necessary information.
      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 - Password or Personal Access Token for the user
      pIgnoreTargetBranchMerge - Exclude merge commits on your target branch. Default value is true and false should only be used in very rare cases.
      pLimit - Apply the limit filter as this can be adjusted up to maximum of 1000 results per request.
      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 Server push event. This MUST be the push event payload
      pQueryParameters - Query Parameters from Bitbucket Server push event. This must be the push event payload.
      pCreateStreams - Should streams be created if not found on the projects?
      pBitbucketUser - Bitbucket Server username
      pBitbucketPassword - Bitbucket Server 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 Server push event. This MUST be the push event payload
      pQueryParameters - Query Parameters from Bitbucket Server push event. This must be the push event payload.
      pCreateStreams - Should streams be created if not found on the projects?
      pBitbucketUser - Bitbucket Server username
      pBitbucketPassword - Bitbucket Server password
      Throws:
      FlexCheckedException
    • getGroovyKey

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