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

ExportXMLWordPrintable

    • Type: Bug
    • Resolution: Not A Defect
    • Priority: Minor
    • Component/s: pipeline
    • Environment:

      We have a multi-branch pipeline setup with our repo in GitHub. Since yesterday, we started noticing that new branches created in GitHub were not passing the build because, of the three directories that get created for the build, the @script dir has the sources, the @tmp is also present but the actual workspace directory is just empty. So, in our case,

      DebugTool-SomeRandomNum directory is just empty
      DebugTool-SomeRandomNum@script dirctory has the sources

      This started happening yesterday. For the other 4 branches (that we already had in GitHub when setting up the multi-branch pipeline), I see that the both the workspace and workspace@script dir have sources in them.

      For now, I have a rather crude way of getting around this

      properties([disableConcurrentBuilds()])
      
      node {
        env.BUILDSPACE = pwd()
        
        echo "BUILDSPACE is ${env.BUILDSPACE}"
        
        // check to see if sources are available in current dir. Else switch to @script dir 
        if (fileExists('package.json')) {
          echo 'package.json exists'
        } else {
          echo 'No package.json. Switching to script dir'
          env.BUILDSPACE = "${env.BUILDSPACE}" + '@script'
          echo "BUILDSPACE is ${env.BUILDSPACE}"
        }
      
         stage "Build Step"
          sh '''cd ${BUILDSPACE}
          #Do stuff here
          '''
      }
      
      

      I have attached the console log from the failed build (sanitized to remove actual GitHub URL info).

      It says that its "Running on master in /var/lib/jenkins/workspace/ZULUSCHED_DebugTool-6RUZGOFIV76HNXGYFRPCOHJUYYIS5YA2O7JZQWZG2RYSCS4XFCJQ"

      but then that directory is just empty

            Assignee:
            Unassigned
            Reporter:
            Bijoy Thomas
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: