You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi, I'm working in a notification app and I'm trying to add a notification when pipelines starts and finish. I tried to execute a curl in a after-script step and it throws me the following error error:
"curl: (56) Recv failure: Connection reset by peer"
When I execute the same curl inside the step, in other step after-script or even if that step fails the curl works just fine. The problem whit this curl is only when the script runs correctly.
This is my after script code:
after-script:
- echo $BITBUCKET_EXIT_CODE
- if [ $BITBUCKET_EXIT_CODE == 0 ]; then export TAG="success"; else export TAG="failed"; fi
- curl -d "{\"app\":\"notification_app\",\"title\":\"$BITBUCKET_REPO_FULL_NAME\",\"author\":\"bitbucket\",\"content\":\"deployment finished\",\"tag\":\"$TAG\",\"link\":\"https://bitbucket.org/$BITBUCKET_REPO_FULL_NAME/addon/pipelines/home#!/results/$BITBUCKET_BUILD_NUMBER\",\"type\":\"deploy\",\"filters\":[\"deploy\",\"EAP\"]}" -H "Content-Type:application/json" -X POST http://$URL/api/v1/notifications
- echo 'Pipeline Finished'
Hi @Tomas
Welcome to the community.
Based on the Curl command response, it seems the endpoint you used is unreachable from the Pipelines container when you run it.
For this, you could try to run the Curl command with verbose loggings by adding the "-v".
This is for you to get more information about the "Connection reset by peer" error.
curl -d -v .....
Let me know how it goes.
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.