[JIRA] (JENKINS-60917) Jenkins Pipeline requires at least one successfull build for the trigger to work

20 views
Skip to first unread message

Sven.Bovens@m-team.be (JIRA)

unread,
Jan 30, 2020, 3:09:02 AM1/30/20
to jenkinsc...@googlegroups.com
Sven Bovens created an issue
 
Jenkins / Bug JENKINS-60917
Jenkins Pipeline requires at least one successfull build for the trigger to work
Issue Type: Bug Bug
Assignee: Kristy Hughes
Components: atlassian-bitbucket-server-integration-plugin
Created: 2020-01-30 08:08
Environment: jenkins: 2.204.1, absi-plugin: 1.0.3
Priority: Minor Minor
Reporter: Sven Bovens

After configuring everything like described on https://community.atlassian.com/t5/Bitbucket-articles/Atlassian-supported-Jenkins-integration-for-Bitbucket-Server/ba-p/1148326 , I get the same behavior as described by Kevin Reynolds: the trigger is executed in bitbucket, receives a 200 back from Jenkins, but no build is started.

In the Jenkins logs I see:

 

Payload: com.atlassian.bitbucket.jenkins.internal.trigger.RefsChangedWebhookEvent@1b554079
Received refs changed event from repo: JG/bitbucket-sonarqube-integration

I've debugged the code and traced it down to the getScms method in BitbucketWebhookConsumer returning an empty collection.

Tracing further why it's empty, I end up in the implementation in

https://github.com/jenkinsci/workflow-job-plugin/blob/master/src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java#L528

which shows it needs at least a completed build to return a non empty collection.

I feel this should rather use (from script console)

 

Jenkins.instance.getItem('bitbucket-sonarqube-integration').definition.scm 

which returns a BitbucketSCM instance as defined in the job definition.

Can easily be reproduced when removing all builds from a job.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mhenschke@atlassian.com (JIRA)

unread,
Jan 30, 2020, 4:53:03 PM1/30/20
to jenkinsc...@googlegroups.com
Martin Henschke closed an issue as Duplicate
Change By: Martin Henschke
Status: Open Closed
Resolution: Duplicate

Sven.Bovens@m-team.be (JIRA)

unread,
Jan 31, 2020, 2:17:03 AM1/31/20
to jenkinsc...@googlegroups.com
Sven Bovens commented on Bug JENKINS-60917
 
Re: Jenkins Pipeline requires at least one successfull build for the trigger to work

Martin Henschke: How is this a duplicate of JENKINS-60649 ? That one is about the webhook not being created. This one is about the webhook not triggering the job. (I created the webhook manually, it fires, it returns an ok result, but no build is being run - all of which is not described in JENKINS-60649)

mhenschke@atlassian.com (JIRA)

unread,
Feb 2, 2020, 4:27:03 PM2/2/20
to jenkinsc...@googlegroups.com
Martin Henschke reopened an issue
 
Change By: Martin Henschke
Resolution: Duplicate
Status: Closed Reopened
Assignee: Kristy Hughes Martin Henschke

mhenschke@atlassian.com (JIRA)

unread,
Feb 2, 2020, 4:28:02 PM2/2/20
to jenkinsc...@googlegroups.com
Martin Henschke commented on Bug JENKINS-60917
 
Re: Jenkins Pipeline requires at least one successfull build for the trigger to work

Hi Sven,

My initial read of the bug suggested this was likely the same root cause as JENKINS-60649- but doing a bit more investigation it looks like they have separate causes. Accordingly, I've reopened the ticket.

aidin.foroughi@gmail.com (JIRA)

unread,
Feb 20, 2020, 9:31:02 PM2/20/20
to jenkinsc...@googlegroups.com
Aidin F commented on Bug JENKINS-60917

I see the same behavior. Exactly as if "Bitbucket Server trigger build after push" is not checked. This does not happen with freestyle projects, only with pipelines. 
I see the webhooks coming in, but nothing triggered

 

Payload: com.atlassian.bitbucket.jenkins.internal.trigger.RefsChangedWebhookEvent@117c02d
Feb 20, 2020 6:15:25 PM FINE com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer
Received refs changed event from repo: HAL/dobby
Feb 20, 2020 6:15:25 PM FINE com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer

aidin.foroughi@gmail.com (JIRA)

unread,
Feb 20, 2020, 9:34:02 PM2/20/20
to jenkinsc...@googlegroups.com
Aidin F edited a comment on Bug JENKINS-60917
I see the same behavior. Exactly as if "Bitbucket Server trigger build after push" is not checked. This does not happen with freestyle projects, only with pipelines. 
I see the webhooks coming in, but nothing triggered

  -------------------

Payload: com.atlassian.bitbucket.jenkins.internal.trigger.RefsChangedWebhookEvent@117c02d
Feb 20, 2020 6:15:25 PM FINE com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer
Received refs changed event from repo: HAL/dobby
Feb 20, 2020 6:15:25 PM FINE com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookConsumer

--------------------


Also, [~sbv] I'm assuming you saw the rest of the conversation in case of Kevin Reynolds. In his case, the "Bitbucket Server trigger build after push"  option was not selected, and instead a similar sounding checkbox related to a different Bitbucket plugin (Bitbucket branch plugin? ) was selected. 

mhenschke@atlassian.com (JIRA)

unread,
Feb 23, 2020, 7:32:05 PM2/23/20
to jenkinsc...@googlegroups.com

mhenschke@atlassian.com (JIRA)

unread,
Feb 23, 2020, 7:32:05 PM2/23/20
to jenkinsc...@googlegroups.com
Martin Henschke started work on Bug JENKINS-60917
 
Change By: Martin Henschke
Status: Reopened In Progress

mhenschke@atlassian.com (JIRA)

unread,
Feb 27, 2020, 6:53:03 PM2/27/20
to jenkinsc...@googlegroups.com
Change By: Martin Henschke
Status: In Review Fixed but Unreleased
Resolution: Fixed
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

mhenschke@atlassian.com (JIRA)

unread,
Feb 27, 2020, 11:48:07 PM2/27/20
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages