Pull request is not triggered when bitbucket webhook sends pullrequest:* event
See original GitHub issueYour checklist for this issue
- Jenkins version Jenkins version: 2.171
- Plugin version Plugin version: 2.4.4
- Bitbucket cloud I’m using Bitbucket cloud
- Bitbucket server and version
Description
I have setup the bitbucket cloud to notify our jenkins server to do a build and it is working but when a pull request is created or updated, it doesn’t trigger a build.
The jenkins server is also setup using Bitbucket Team/Project and it is working fine, just the pull request part.
There’s nothing wrong with my Jenkinsfile since if a manually trigger the build on pull request, it will execute the steps defined in there.
Here is by Jenkinsfile:
def ISSUES
pipeline {
agent none
stages {
stage('Executing Tests') {
parallel {
stage('UI/UX Test') {
agent {
docker {
image 'rodolforicojr/katalon-jenkins'
args "-u root"
}
}
when {
changeRequest comparator: 'EQUALS', target: 'master'
}
steps {
dir('tests/katalon') {
script{
ISSUES = jiraSearch 'project = WCWT AND issuetype = Test AND "Cucumber Test Type" in (Scenario, "Scenario Outline")'
}
step([$class: 'XrayExportBuilder', filePath: 'Include/features', issues: ISSUES.join(';'), serverInstance: 'f9b8d4af-5dcb-4361-bad4-d0f2b1f7e49b'])
sh 'katalon-execute.sh -browserType="Firefox" -retry=0 -statusDelay=15 -testSuitePath="Test Suites/RunFeatures" -executionProfile="staging"'
}
}
post {
always {
dir('tests/katalon') {
archiveArtifacts artifacts: 'report/**/*.*', fingerprint: true
// junit 'report/**/JUnit_Report.xml'
cucumber failedFeaturesNumber: -1, failedScenariosNumber: -1, failedStepsNumber: -1, fileIncludePattern: '**/*.json', jsonReportDirectory: 'report/cucumber_report', pendingStepsNumber: -1, skippedStepsNumber: -1, sortingMethod: 'ALPHABETICAL', undefinedStepsNumber: -1
sh label: '', script: 'cp report/cucumber_report/$(ls report/cucumber_report -t1 | head -n 1)/cucumber.json report/cucumber_report/cucumber.json'
step([$class: 'XrayImportBuilder', endpointName: '/cucumber', importFilePath: 'report/cucumber_report/cucumber.json', serverInstance: 'f9b8d4af-5dcb-4361-bad4-d0f2b1f7e49b'])
sh label: '', script: 'rm -R report'
}
}
}
}
}
}
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
Bitbucket YAML Pull Request Trigger Not Working (webhook ...
The pull request webhook is returning 500. "repo:push" webhooks are 200 response and work but "pullrequest:updated" do not.
Read more >Bitbucket Webhooks Troubleshooting
Bitbucket Push And Pull Request Plugin will not work if the Bitbucket Plugin is installed. 1) Endpoint. This applies to Bitbucket repositories configured...
Read more >Solved: How to trigger a webhook when a commit is pushed t...
I am currently using the "Pull Request Opened" webhook event to trigger a CI ... While the Atlassian support page for Bitbucket Server...
Read more >Drone ignores pullrequest:created webhook sent from ...
Drone does not support pull request events for bitbucket cloud at the moment. Bitbucket also has an open issue about this.
Read more >Bitbucket Push and Pull Request - Jenkins Plugins
Bitbucket Push And Pull Request Plugin will not work if the old ... for jobs triggered through the BitBucket webhook (and not for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found the issue to my problem! My issue was I had a Build strategy to build Named branches, and I think this filter also filtered out Pull Requests. Once I removed this, Pull Requests started to build on creation.
I think my path of how I got stuck in it was this: Reproduce:
Fix:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.