At the moment, I have pipelines that run during a pull request and one when we merge to main. I want to be able to share data between them for version control but I am not able to do so. Just for more context, see example below:
pipelines:
pull-requests:
develop*:
-step: export dummy_data=1
branch:
main:
script:
- echo "$dummy_data"
I tried a suggestions in one of the forums that recommended to use the trigger pipeline( if you have any other suggestions please let me know.
Current the trigger pipeline is as follows(i include the promote pipe in the pull request pipe.
step: &promote
name: Promote
script:
- source version.env
- BB_TOKEN=secret
- pipe: atlassian/trigger-pipeline:5.8.1
variables:
BITBUCKET_ACCESS_TOKEN: $BB_TOKEN
REPOSITORY: <name-of-repo>
REF_TYPE: 'branch'
REF_NAME: develop_branch
PIPELINE_VARIABLES: >
[
{
"key": "dummy_data",
"value": "1"
}
]
WAIT: 'true'
Every time I run with this step I get the following error, I am not sure what I am setting wrongly.
✖ Error: {"error": {"message": "Bad request", "detail": "Requested selector is not found in bitbucket-pipelines.yml.", "data": {"key": "result-service.pipeline.selector-not-found", "arguments": {}}}}