getting the custom pipeline name from api within a step

Santiago Bernhardt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 12, 2025

How can we capture the name of the pipeline?

Currently we are doing something like this. But cannot find a way to grab the "custom:pipeline-name"

I cannot believe this is not a native feature...

```

- step: &slack-notification
name: slack-notification
script:
# from the aws-mapping step
- SLACK_WEBHOOK_URL=$(cat ./SLACK_WEBHOOK_URL.txt)
- BITBUCKET_TRIGGERER_USERNAME=$(curl -X GET -g "https://api.bitbucket.org/2.0/users/${BITBUCKET_STEP_TRIGGERER_UUID}" | jq --raw-output '.display_name')

something like what?
- BITBUCKET_PIPE_NAME=$(curl --request GET --url "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_FULL_NAME}/pipelines/%7B${BITBUCKET_PIPELINE_UUID}%7D" | jq --raw-output 'something')

- pipe: atlassian/slack-notify:2.3.1
variables:
WEBHOOK_URL: $SLACK_WEBHOOK_URL
MESSAGE: '":point_right: \`$BITBUCKET_TRIGGERER_USERNAME\` triggered \`$BITBUCKET_PIPE_TYPE\` for \`$EnvironmentName\` from branch \`$BITBUCKET_BRANCH\`"'
```

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events