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

Multibranch project git branch checkout

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Currently, in a multibranch workflow job, git scm checks out in detached mode and not on ${env.BRANCH_NAME}. My script generates files based on git info, which is why I added those lines after "checkout scm" :

      {{sh "git branch -D ${env.BRANCH_NAME} || echo 1"
      sh "git checkout -b ${env.BRANCH_NAME}"}}

      Is there a way to make this a default ? Is there a reason why this is not done like this ?

        Attachments

          Issue Links

            Activity

            thebignet Jean Detoeuf created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Component/s git-plugin [ 15543 ]
            Component/s workflow-plugin [ 18820 ]
            Assignee Jesse Glick [ jglick ] Mark Waite [ markewaite ]
            Labels workflow
            jglick Jesse Glick made changes -
            Resolution Not A Defect [ 7 ]
            Status Open [ 1 ] Resolved [ 5 ]
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-31924 [ JENKINS-31924 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 168196 ] JNJira + In-Review [ 198372 ]
            abayer Andrew Bayer made changes -
            Labels workflow pipeline workflow
            abayer Andrew Bayer made changes -
            Labels pipeline workflow pipeline
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              Assignee:
              markewaite Mark Waite
              Reporter:
              thebignet Jean Detoeuf
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: