Jenkins Catches 'Comment Created' but BITBUCKET_PULL_REQUEST_COMMENT_TEXT is Empty.
mohammad-eghlima opened this issue · comments
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.
....
....
and this is the log for Jenkins:
Trigger not set
Apr 23, 2022 7:24:12 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger
Called onPost Method for action BitBucketPPRPullRequestAction
Apr 23, 2022 7:24:12 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger onPost
Triggers are not configured.
Apr 23, 2022 7:25:05 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.receiver.BitBucketPPRHookReceiver doIndex
Received POST request over Bitbucket hook
Apr 23, 2022 7:25:05 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.receiver.BitBucketPPRHookReceiver
the payload is: {}
Apr 23, 2022 7:25:05 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.processor.BitBucketPPRPayloadProcessorFactory createProcessor
Create BitBucketPPRPullRequestCloudPayloadProcessor
Apr 23, 2022 7:25:05 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.observer.BitBucketPPRObserverFactory
Add BitBucketPPRPullRequestCloudObserver for {}
Apr 23, 2022 7:25:05 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe lambda$triggerMatchingJobs$1
Trigger not set
Apr 23, 2022 7:25:05 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger
Called onPost Method for action BitBucketPPRPullRequestAction
Apr 23, 2022 7:25:05 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger onPost
Triggers are not configured.
Apr 23, 2022 7:34:27 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.receiver.BitBucketPPRHookReceiver doIndex
Received POST request over Bitbucket hook
Apr 23, 2022 7:34:27 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.receiver.BitBucketPPRHookReceiver
the payload is: {}
Apr 23, 2022 7:34:27 PM INFO io.jenkins.plugins.bitbucketpushandpullrequest.processor.BitBucketPPRPayloadProcessorFactory createProcessor
Create BitBucketPPRPullRequestCloudPayloadProcessor
Apr 23, 2022 7:34:27 PM FINE io.jenkins.plugins.bitbucketpushandpullrequest.observer.BitBucketPPRObserverFactory
Add BitBucketPPRPullRequestCloudObserver for {}
Apr 23, 2022 7:34:27 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRJobProbe lambda$triggerMatchingJobs$1
Trigger not set
Apr 23, 2022 7:34:27 PM FINEST io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger
Called onPost Method for action BitBucketPPRPullRequestAction
Apr 23, 2022 7:34:27 PM WARNING io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger onPost
Triggers are not configured.
any update on this one? i am stuck! the comment on the PR which triggered the job is empty.