I have one (1) workspace : sampleproject
I have multiple repos in this workspace (e.g repo1, repo2 ....... repoX)
When I run a pipeline in repo1 i want to call bitbuckets API to update a deployment environment variable in repo2.
I have been trying but with no luck. see below the error message returned by the API call
{"type": "error", "error": {"message": "workspace"}}
see my bitbucket-pipelines.yml below
pipelines:
default:
- step:
name: 'Build'
caches:
- dotnetcore
script:
- 'curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $PIPELINES_JWT_TOKEN" -d ''{"key":"key", "value":"value", "secured":false }'' https://api.bitbucket.org/2.0/repositories/sampleproject/repo2_slug/deployments_config/environments/environmentUUIDcomeshere/variables'