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

       

          [JENKINS-60602] Bitbucket integration with Jenkins

          Hi cdelmonte and dear sirs!

          Do you have any updates in case?

          Thanks in advance. 

           

          Regards,

          Alexander

          Alex Martynenko added a comment - Hi cdelmonte and dear sirs! Do you have any updates in case? Thanks in advance.    Regards, Alexander

          Hello martynen

          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

           

          Christian Del Monte added a comment - Hello martynen 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  

          Hi cdelmonte

          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 added a comment - Hi cdelmonte 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.  

          Hi cdelmonte,

          Do you have any updates in case?

          Thanks in advance. 

           

          Regards,

          Alexander

          Alex Martynenko added a comment - Hi  cdelmonte , Do you have any updates in case? Thanks in advance.    Regards, Alexander

            cdelmonte Christian Del Monte
            martynen Alex Martynenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: