I am using Cypress and Bitbucket for CI/CD. I have scheduled the run in bitbucket pipeline. I use the email notify feature in after script to get the test result via mail. it is difficult for me to understand which module failed. I have added bitbucket build number, step uuid. But, I want to include the name that I have added in the script.
I want the {BITBUCKET_STEP_NAME} to have the name of the step that is "Module 1". But, it was not working.
step: <<: default-step
name: Module 1
after-script:
pipe: atlassian/email-notify:0.13.1
variables:
USERNAME: "xxxx@gmail.com"
PASSWORD: "......"
FROM: "xxxx@gmail.com"
TO: "yyyy@gmail.com"
HOST: "smtp.gmail.com"
PORT: 587
DEBUG: "true"
SUBJECT: "${BITBUCKET_STEP_NAME} [STAGING] BUILD# ${BITBUCKET_BUILD_NUMBER} ${STATUS}: ${BITBUCKET_STEP_NAME} Notification for ${BITBUCKET_BRANCH}."
BODY_PLAIN: "The artifacts can be downloaded from the following URL: $ARTIFACTS_URL"
${BITBUCKET_STEP_NAME}
${BITBUCKET_STEP_NAME}
${BITBUCKET_STEP_NAME}