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

do not delete workspace silently while invoking git url: https://mygitrepo in pipeline

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • git-plugin
    • None
    • git plugin 3.3.0

      It seems when invoking git url: https://mygitrepo in pipeline, workspace is wipe out without any notice. I can hardly understands what is the reason for such action.

      I would propose to verify if this behaviour is proper as this may confuse pipeline users.

       

      For verification,following script can be used:

      node('linux') {
            stage('clear workspace'){
              deleteDir()      }
      
            stage('file test'){
              sh 'du > out.txt'
              sh 'ls'   }
            
            stage("git") {
              git url: 'https://mygitrepo'      }
      
            stage('there is no out.txt file anymore after git stage')    {
              sh  'ls'   }
      }

            Unassigned Unassigned
            omka Paul Walter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: