0
votes

sh '''curl -X POST -H "Content-Type: application/json" -d '{ "name": "'"$GroupName"'", "deletable": "true"}’'https://"${username}":"${password}"@bitbucket.com/rest/api/1.0/admin/groups?name="$GroupName" '''

I use the. above in the Jenkins pipeline. on Executing I am getting an error curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information

1

1 Answers

0
votes

just figured out

This is an API call from Jenkins to Create Group in BB.

sh '''curl -X POST -H "Content-Type: application/json" -d ' { "name": "'"$GroupName"'", "deletable": "true" }' https://"${username}":"${password}"@bitbucket.com//rest//api//1.0//admin//groups?name=$GroupName''' }

replace your bitbucket URL.