I've been referring to https://confluence.atlassian.com/bitbucket/code-insights-994316785.html, but I'm having zero luck publishing report to proxy:
http://localhost:29418
When I use "-u" with my user password, publishing works, however via pipeline it doesn't. This is my JSON:
DATA='{
"title": "Report",
"details": "This report shows results of behave tests",
"report_type": "TEST",
"reporter": "text",
"link": "https://myurl.com/'"${BITBUCKET_COMMIT}"'/index.html",
"result": "FAILED",
"data": [
{
"title": "Duration (seconds)",
"type": "DURATION",
"value": 14
},
{
"title": "Safe to merge?",
"type": "BOOLEAN",
"value": false
}
]
}'
This is my query:
curl --proxy 'http://localhost:29418' --request PUT "https://api.bitbucket.org/2.0/repositories/myorganization/myrepo/commit/${BITBUCKET_COMMIT}/reports/uiauto-${BITBUCKET_BUILD_NUMBER}" \
--header 'Content-Type: application/json' --data $DATA
And this is what I get back:
<span>% Total % Received % Xferd Average Speed Time Time Time Current</span><span> Dload Upload Total Spent Left Speed</span><span> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0</span><span> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0</span><span>curl: (56) Received HTTP code 400 from proxy after CONNECT</span>