1 year ago

#336769

test-img

pgundlupet

Cannot view attached file in BitBucket PR comment via curl from Jenkinsfile

I am trying to attach a html file to bitbucket PR comment via curl command from Jenkinsfile. Here is the curl command I am using - curl -k -u $username:$pass -X POST $URL -H \"Content-Type: multipart/form-data\" -F "file=@/<obsolute_path>\index.html\". With --verbose I see no errors in curl execution but I am not sure if the file is attached to bb. BB PR comment generated

enter image description here

When I click index.html I see com.atlassian.bitbucket.NoSuchObjectException

enter image description here

Jenkins console showing curl --verbose logs - enter image description here

When I access that attachment endpoint it throws HTTP 405 PAGE ERROR On --trace - I can see the content of my html file but can't figure out where is the getting uploaded/attached in bb. --trace log below

enter image description here enter image description here

My Bitbucket version is 7.8.1 and on API 1.0

curl

bitbucket

bitbucket-server

bitbucket-api

0 Answers

Your Answer

Accepted video resources