Hi ,
I have a bitbucketpipelines and i have defined the email notify pipe inside it.
i want to send email based on some if condition but rest of the code must execute . i have written the if condition but its exit when meet the condition and not executing scripts defines after that .. ie. i want to execute ./deployment.sh always
e.g.
branches:
testing:
- step:
name: Test
script:
- my_condition="$env_var"
- subject="subject"
- desc="desc"
- if [ ! "$my_condition" ]; then exit 0 ; fi
- pipe: atlassian/email-notify:0.12.0
variables:
USERNAME: $UNAME
PASSWORD: $PWD
FROM: $FROM
TO: $TO
HOST: $HOST
PORT: $PORT
TLS: $TLS
SUBJECT: "$ubject"
DEBUG: $TRUE
BODY_PLAIN: "$desc"
# Build Part
- export ENV=$BRANCH
- python -m pip install -r requirements.txt
- ./deployment.sh $ENV