Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-20046

Pull-request stage do checkout with short commit hash

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      I'm using pact (tool for contract-testing) and variable BITBUCKET_COMMIT in Bitbucket pipelines for define versions of my app.

      Faced with different behavior when using "pull-requests" stage. 

      Cloning code for "pull-requests" has shortened commit SHA then other stages (branches, default).

      Steps to reproduce:

      1. Create bitbucket-pipelines.yaml(image: atlassian/default-image:2) with "default" and "pull-request: stage
      2. Run stages
      3. See Build setup

      Example for default stage(SHA = 40 symbols):

      Example for pull-request stage (SHA = 11 symbols):

      As a result for the same commit, variable BITBUCKET_COMMIT has different values.

      Suggestion: do a consistent "pull-requests" stage and take 40 symbols commit hash.

      Attachments

        Activity

          People

            Unassigned Unassigned
            artem.borsuk Artem Borsuk
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: