Although, I've been through many of the related questions here, I cannot figure out what I'm doing wrong.
I've set up a test repository at https://bitbucket.org/<my-workspace>/<my-test-repo>.
Then I've added a custom pipeline (bitbucket-pipelines.yml)
image: atlassian/default-image:3
pipelines:
custom:
configure:
- variables:
- name: TENANTS
- name: STAGE
- step:
name: configure-create-and-campus
script:
- chmod +x scripts/reconfigure.sh
- scripts/reconfigure.sh some
- scripts/reconfigure.sh other
Triggering the pipeline manually from the Bitbucket Admin Interface works.
Then I've created an Access Token for the repo with pipeline:write permissions.
Then I've tried to query against the Bitbucket API endpoint, like stated in your REST API Docs via Postman. The Authorization Bearer Token has been added.
Endpoint: https://api.bitbucket.org/2.0/repositories/<my-workspace>/<my-test-repo>/pipelines/
My request body looks like so
{
"target": {
"ref_type": "branch",
"type": "pipeline_ref_target",
"ref_name": "master",
"selector": {
"type": "custom",
"pattern": "Using parameter for tenants"
}
},
"variables": [
{
"key": "TENANTS",
"value": "[\"codeversity.com\",\"sycademy.com\",\"heartbase.at\",\"tangoamadeus.com\", \"verbund.sycademy.com\",\"kaidoo.com\",\"blockademy.net\",\"oecademy.codeversity.com\",\"neeom.codeversity.com\",\"hb-tischler.heartbase.at\"]"
},
{
"key": "STAGE",
"value": "testing"
}
]
}Unfortunately, the request I get is always
{
"error": {
"message": "Bad request",
"detail": "bitbucket-pipelines.yml not found.",
"data": {
"key": "result-service.pipeline.yml-not-found",
"arguments": {}
}
}
}
Any ideas?
Any help much appreciated! 🙌