Hi, I want to run pipe `slack-notify` conditionally after a step finished (in after-script statement).
Is there any syntax that run the pipe conditionally by checking BITBUCKET_EXIT_CODE (only when FAILED(1)) ?
Desired situation using pseudo-YAML:
```yaml
Hi @Jiwon Jeon
Thank you for your question!
You could try the next solution:
script:
- ...
after-script:
- if [[ BITBUCKET_EXIT_CODE -eq 0 ]]; then exit 0; else echo "Step failed"; fi
- envsubst < ".pipelines/failed_pipe_payload.json.template" > ".pipelines/slack_payload.json"
- pipe: atlassian/slack-notify:2.0.0
...
Best regards,
Oleksandr Kyrdan
It works! Thanks for your support :)
I think it would be good if condition syntax is supported for pipe too!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I want to verify if `$` is really no longer needed in
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.