Hi all,
I'm trying to automate my bitbucket repo creation via a bash script and am stuck on the following endpoint
/2.0/repositories/{workspace}/{repo_slug}/pipelines_config
I'm trying the following:
curl -X PUT -v -u "$BITBUCKET_AUTH_EMAIL":"$BITBUCKET_AUTH_PASS" -H "Content-Type: application/json" \
https://api.bitbucket.org/2.0/repositories/$BITBUCKET_USER/$REPO_SLUG/pipelines_config -d \
'{
"enabled": true
}'
which I thought would be the same as going 'Repository Settings > Pipeline > Settings > Enable Pipeline'
but this returns :
{"type": "error", "error": {"message": "Resource not found"}}
I've also tried a few variations:
curl -X PUT -v -u "$BITBUCKET_AUTH_EMAIL":"$BITBUCKET_AUTH_PASS" -H "Content-Type: application/json" \
https://api.bitbucket.org/2.0/repositories/$BITBUCKET_USER/$REPO_SLUG/pipelines_config -d \
'{
"enabled": true
}'
curl -X PUT -v -u "$BITBUCKET_AUTH_EMAIL":"$BITBUCKET_AUTH_PASS" -H "Content-Type: application/json" \
https://api.bitbucket.org/2.0/repositories/$BITBUCKET_USER/$REPO_SLUG/pipelines_config -d \
'{
"enabled": true,
"type": "repository_pipelines_configuration"
}'
but these also return the above result.
Other than that i've been able to setup pipeline vars & pipeline key pair without any issues so any help pointing me in the right direction would be appreciated.