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

Include step name as default variable in Bitbucket Cloud Pipelines

    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

      Currently, the Pipelines step name is not part of the default Pipelines environment variables.

      Enhancement request:
      It would be helpful to include the step name as a default variable.

      Workaround:
      As a workaround, you can get the current step name using an API endpoint and save it as an environment variable.

      image: atlassian/default-image:4
      
      pipelines:
        default:
            - step:
                name: "Some Step Name"
                script:
                  - BB_STEP_NAME=$(curl --request GET --url "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_FULL_NAME}/pipelines/%7B${BITBUCKET_PIPELINE_UUID}%7D/steps/%7B${BITBUCKET_STEP_UUID}%7D?fields=name" -u $BITBUCKET_USERNAME:$BITBUCKET_APP_PASSWORD | jq -r '.name')
                  - echo $BB_STEP_NAME
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mcerezo Mark C
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: