Hi guys!
I'm trying running Pull request Pipeline over API (/2.0/repositories/{workspace}/{repo_slug}/pipelines/), but keep having errors like:
{"code": 500, "message": "There was an error processing your request. It has been logged (ID 68d1ff2ffa3a61ad)."}
{"error": {"message": "Bad request", "detail": "bitbucket-pipelines.yml not found.", "data": {"key": "result-service.pipeline.yml-not-found", "arguments": {}}}}
{"code": 500, "message": "There was an error processing your request. It has been logged (ID e62e45d4cddd8672)."}
{"code": 500, "message": "There was an error processing your request. It has been logged (ID 932972b1d66d01f1)."}
{"code": 500, "message": "There was an error processing your request. It has been logged (ID b66f07a503a3ce8c)."}
The payload I send is this:
data = {
"target": {
"type": "pipeline_pullrequest_target",
"source": "feature/test-1",
"destination": "master",
"selector": {
"type": "pull-requests",
"pattern": "**"
},
}
}
And target repo bitbucket-pipelines.yml:
image: python:3
pipelines:
pull-requests:
'**':
- step:
caches:
- pip
script:
- pip install --upgrade pip
...
It looks like it's not documented, but there are some references people are using it.
Please help me to get it working...
I've managed to make it work with the following payload on my sample repository.
{
"target": {
"type": "pipeline_pullrequest_target",
"source": "pull-request-branch",
"destination": "master",
"destination_commit": {
"hash" : "9f848b7"
},
"pullrequest" : {
"id" : "3"
},
"selector": {
"type": "pull-requests",
"pattern": "**"
},
"commit": {
"hash" : "1a372fc"
}
}
}
I will add a new sample for pull request pipelines in the REST documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.