[JIRA] (JENKINS-60602) Bitbucket integration with Jenkins

15 views
Skip to first unread message

alex.martynenko.presenso@gmail.com (JIRA)

unread,
Dec 29, 2019, 7:47:03 AM12/29/19
to jenkinsc...@googlegroups.com
Alex Martynenko created an issue
 
Jenkins / Task JENKINS-60602
Bitbucket integration with Jenkins
Issue Type: Task Task
Assignee: Christian Del Monte
Attachments: release-notes.png
Components: bitbucket-push-and-pull-request-plugin, webhook-step-plugin
Created: 2019-12-29 12:46
Labels: jenkins bitbucket
Priority: Critical Critical
Reporter: Alex Martynenko

Please, advice how to make such integration.

  • I have merged PR's in Bitbucket.
  • I would like the information from these PR's (diff pull request number + title) to populate in the parametrised "Release Notes" field of Jenkins.
  • This should happen when you click the "Build with parameters" button in Jenkins. 

 

Example of view merged pull request in Bitbucket (that should come to Jenkins):

#490: Implementation release notes feature 

Example of Release Notes field in Jenkins (that we have in current configuration):

Attachment: release-notes.png

 

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

alex.martynenko.presenso@gmail.com (JIRA)

unread,
Dec 29, 2019, 7:50:02 AM12/29/19
to jenkinsc...@googlegroups.com
Alex Martynenko updated an issue
Change By: Alex Martynenko
Please, advice how to make such integration.
* I have merged PR's in Bitbucket.
* I would like the information from these PR's (diff pull request number + title) to populate in the parametrised "Release Notes" field of Jenkins.
* This should happen when you click the "Build with parameters" button in Jenkins. 


 

Example of view merged pull request in Bitbucket (that should come to Jenkins):

#490: Implementation release notes feature 

#491: Fixing bug in release notes

#492: Improvements in release notes functionality

Example of Release Notes field in Jenkins (that we have in current configuration):

Attachment: release-notes.png

 

alex.martynenko.presenso@gmail.com (JIRA)

unread,
Dec 29, 2019, 7:50:02 AM12/29/19
to jenkinsc...@googlegroups.com
Alex Martynenko updated an issue
Please, advice how is better to make such integration.

* I have merged PR's in Bitbucket.
* I would like the information from these PR's (diff pull request number + title) to populate in the parametrised "Release Notes" field of Jenkins.
* This should happen when you click the "Build with parameters" button in Jenkins. 

 

Example of view merged pull request in Bitbucket (that should come to Jenkins):

#490: Implementation release notes feature 

#491: Fixing bug in release notes

#492: Improvements in release notes functionality

Example of Release Notes field in Jenkins (that we have in current configuration):

Attachment: release-notes.png

 

alex.martynenko.presenso@gmail.com (JIRA)

unread,
Jan 3, 2020, 6:04:03 PM1/3/20
to jenkinsc...@googlegroups.com
Alex Martynenko commented on Task JENKINS-60602
 
Re: Bitbucket integration with Jenkins

Hi Christian Del Monte and dear sirs!

Do you have any updates in case?

Thanks in advance. 

 

Regards,

Alexander

register@cdelmonte.de (JIRA)

unread,
Jan 13, 2020, 11:14:04 AM1/13/20
to jenkinsc...@googlegroups.com

Hello Alex Martynenko

thank you for your message.

 

As we understand it, there are in you scenario two unrelated jobs: the first one is triggered automatically in case of merged PR, whereas the second one is a parametrized job triggered manually.

The first one gives to disposal some Info, which are somehow collected.

These infos are afer that going to be used from the second job as parameters.

You could write those infos in a file, using a bash command, so you can read them directly as a file parameter.

Hopefully this can help you.

 

For issues and proposals, please use the github repo of the plugin.

https://github.com/jenkinsci/bitbucket-push-and-pull-request-plugin

Thanks

 

register@cdelmonte.de (JIRA)

unread,
Jan 13, 2020, 11:16:05 AM1/13/20
to jenkinsc...@googlegroups.com
Christian Del Monte closed an issue as Not A Defect
Change By: Christian Del Monte
Status: Open Closed
Resolution: Not A Defect

alex.martynenko.presenso@gmail.com (JIRA)

unread,
Jan 13, 2020, 4:31:03 PM1/13/20
to jenkinsc...@googlegroups.com

Hi Christian Del Monte

Thanks for respond.

Right now my current scenario looks like:

1. Get date of latest release
(by username, message) - git commit date (git log)
Filter git log and find those data

2. Get list of merged pull requests after last release
Curl -> to bitbucket API pull request with filtering:
state: merged
destination branch: develop
updated_on (Result of step 1)
(Check if updated_on is date when PR has been merged)

3. Parse response from Bitbucket API
(Retrieve from PR "title" and "id")

4. Integrate output file (data with "title" and "id" after step 3) with Jenkins

 

For me is more important step 4 right now.

And the main question is:

I will have output text file with all merged pull requests (after 3 steps). 

How is better to inject it to Jenkins in parametrised field? (showed on attachment release-notes.png)

My logic is the next: Such field should have such ID, how to get it?

And how is better to do such implementation? Some plugins or is possible via Jenkins API with proper CURL request?

I mean to publish data that is specified in some text file directly to parametrised field.

 

Thanks in advance.

Regards,

Alexander.

 

alex.martynenko.presenso@gmail.com (JIRA)

unread,
Jan 13, 2020, 4:38:02 PM1/13/20
to jenkinsc...@googlegroups.com
Alex Martynenko reopened an issue
Change By: Alex Martynenko
Resolution: Not A Defect
Status: Closed Reopened

alex.martynenko.presenso@gmail.com (JIRA)

unread,
Jan 15, 2020, 11:02:08 AM1/15/20
to jenkinsc...@googlegroups.com

Do you have any updates in case?

Thanks in advance. 

 

Regards,

Alexander

Reply all
Reply to author
Forward
0 new messages