bitbucket-push-and-pull-request-plugin
bitbucket-push-and-pull-request-plugin copied to clipboard
Jenkins Catches 'Comment Created' but BITBUCKET_PULL_REQUEST_COMMENT_TEXT is Empty.
We have the Jenkins hook setup in the bitbucket cloud:
We have the plugin setup in the Jenkins:
We have the trigger on the job:
I have a freestyle job, it is set to be run when i leave a comment on a PR like 'deploy to qa-[2|3|4]' It runs the job but in the shell script which i have for the build step:
#!/bin/bash
echo $BITBUCKET_SOURCE_BRANCH
echo $BITBUCKET_PULL_REQUEST_COMMENT_TEXT
echo $BITBUCKET_TARGET_BRANCH
It prints the below:
feature/xxxxxxxxnew-architecture-jenkins
develop
the $BITBUCKET_PULL_REQUEST_COMMENT_TEXT
is empty! it means it was not populated with the comment on pr which was deploy to qa-[2|3|4]
.
In the available environment variable link, i have:
The following variables are available to shell and batch build steps:
BITBUCKET_SOURCE_BRANCH
Source branch - only for pull requests (BB Cloud and BB Server).
BITBUCKET_PULL_REQUEST_ID
Pull request identifier (BB Cloud and BB Server).
BITBUCKET_PULL_REQUEST_LINK
Pull request link (BB Cloud and BB Server).
BITBUCKET_TARGET_BRANCH
Target branch (BB Cloud and BB Server).
BITBUCKET_REPOSITORY_UUID
Repository identifier - only for BB Cloud pushs.
BITBUCKET_REPOSITORY_ID
Repository identifier - only for BB Server pushs.
BITBUCKET_REPOSITORY_URL
Repository URL - only for BB Cloud pushs.
BITBUCKET_PULL_REQUEST_COMMENT_TEXT
Text comment of BB Cloud Pull Request.
....
....