Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70373

How to merge two git branches in a pipeline script

XMLWordPrintable

      Hi Guys,

       

         I am unable to find a solution to merge two git branches in a pipeline as script code. Below is my code developed so far to checkout and merge. Only chekcout step is working. Please advise what can i need to complete the merge process in one stage.

       
       

      stage("merge") {
                  steps {
                  checkout( [
                      $class: 'GitSCM',
                      branches: [[name: "dev"]],
                      userRemoteConfigs: [
                          [credentialsId: 'creds',
                                  url: 'url.git']
                              ]
                          ]
                      )
                  }
              }

       
       

      Thanks,

      kumar.

            aaronjwhiteside Aaron Whiteside
            kumar45 kumar karan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: