Multibranch project git branch checkout

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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 ?

            Assignee:
            Mark Waite
            Reporter:
            Jean Detoeuf
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: