I am planning to add a command to my bitbucket pipeline.
curl -X POST -H 'Content-type: application/json' --data '{"text":"Allow me to reintroduce myself!"}' YOUR_WEBHOOK_URL
How do I do that, if I add this line it shows an error, guide me with correct steps for this.
Hi @Ajay Maurya ,
Thank you for your question!
It's a good case to use slack-notify pipe.
script:
- pipe: atlassian/slack-notify:0.3.5
variables:
WEBHOOK_URL: $WEBHOOK_URL
MESSAGE: 'Allow me to reintroduce myself!'
More useful pipes you can discover on the Bitbucket Pipes Marketplace.
Cheer,
Alex
Hi @Oleksandr Kyrdan
Thanks for the help.
I ended applying the same thing which you mentioned https://bitbucket.org/atlassian/slack-notify/src/master/
I am glad I did it the correct way.
Thanks once again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ajay, welcome to the Community!
I can see this curl command matches what's in Slack's 'hello world' tutorial. There are some prerequisites to sending a notification like this in the guide; an app already needs to be set up in your Slack instance to generate a webhook URL and connect it to a channel.
Are you able to run this curl command locally and receive the message in Slack?
If so, can you post the error you're receiving from the pipeline?
Thanks,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.