Details

    • Similar Issues:

      Description

      I am building a pipeline job with parallel stages. The pipeline will run on two slave machines. One is MAC and other is WINDOWS. If I execute more than
      one instance of the pipeline, it seems there is a permission error in windows. Like 

      npm ERR! path C:\workspace\ntal_build_new_pull_request-BL7QHNTCEFER3V4N6SFI4MCLHOCO62H22UO6N4UOONFACJ44GBIA\node_modules\.staging\typescript-c52c96ba\lib\es\diagnosticMessages.generated.json 
       
       
      npm ERR! code EPERM 
       
       
      npm ERR! errno -4048 
       
       
      npm ERR! syscall unlink 
       
       
      npm ERR! Error: EPERM: operation not permitted, unlink 'C:\workspace\ntal_build_new_pull_request-BL7QHNTCEFER3V4N6SFI4MCLHOCO62H22UO6N4UOONFACJ44GBIA\node_modules\.staging\typescript-c52c96ba\lib\es\diagnosticMessages.generated.json' 
       
       
      npm ERR! { [Error: EPERM: operation not permitted, unlink 'C:\workspace\ntal_build_new_pull_request-BL7QHNTCEFER3V4N6SFI4MCLHOCO62H22UO6N4UOONFACJ44GBIA\node_modules\.staging\typescript-c52c96ba\lib\es\diagnosticMessages.generated.json'] 
       
       
      npm ERR! cause: 
       
       
      npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\workspace\ntal_build_new_pull_request-BL7QHNTCEFER3V4N6SFI4MCLHOCO62H22UO6N4UOONFACJ44GBIA\node_modules\.staging\typescript-c52c96ba\lib\es\diagnosticMessages.generated.json' 
       
       
      npm ERR! errno: -4048, 
       
       
      npm ERR! code: 'EPERM', 
       
       
      npm ERR! syscall: 'unlink', 
       
       
      npm ERR! path: 
       
       
      npm ERR! 'C:\\workspace\\ntal_build_new_pull_request-BL7QHNTCEFER3V4N6SFI4MCLHOCO62H22UO6N4UOONFACJ44GBIA\\node_modules\\.staging\\typescript-c52c96ba\\lib\\es\\diagnosticMessages.generated.json' }, 
       
       
      npm ERR! stack: 
       
       
      npm ERR! 'Error: EPERM: operation not permitted, unlink \'C:\\workspace\\ntal_build_new_pull_request-BL7QHNTCEFER3V4N6SFI4MCLHOCO62H22UO6N4UOONFACJ44GBIA\\node_modules\\.staging\\typescript-c52c96ba\\lib\\es\\diagnosticMessages.generated.json\'', 
       
       
      npm ERR! errno: -4048, 
       
       
      npm ERR! code: 'EPERM', 
       
       
      npm ERR! syscall: 'unlink', 
       
       
      npm ERR! path: 
       
       
      npm ERR! 'C:\\workspace\\ntal_build_new_pull_request-BL7QHNTCEFER3V4N6SFI4MCLHOCO62H22UO6N4UOONFACJ44GBIA\\node_modules\\.staging\\typescript-c52c96ba\\lib\\es\\diagnosticMessages.generated.json', 
       
       
      npm ERR! parent: 'IBMDigitalAppBuilder' } 
       
       
      npm ERR! 
       
       
      npm ERR! The operation was rejected by your operating system. 
       
       
      npm ERR! It's possible that the file was already in use (by a text editor or antivirus), 
       
       
      npm ERR! or that you lack permissions to access it. 
       
       
      npm ERR!
      

       
      Even when I am using a dynamic workspace folder because of this. The workspace folder is working as they should but why these folders are created in the first place.

      My pipeline code is something like this.-
      
      pipeline {    
      agent {        
      label {           
       label ""            
      customWorkspace "./workspace/BuildFor_${env.JOB_NAME}_${env.BRANCH_NAME}_${env.BUILD_NUMBER}" 
             }    }    
       stages {        
      stage ("Copywrite Check + Dynamically Generate .npmrc file") {          
        parallel {               
       stage('Checking copywrite and generating .npmrc file on MAC') {              
            agent {                
              label "mf-build-11"                  
        }                  
        steps {                
              // sh 'python scripts/check_copyright.py'               
      
               sh 'echo $BUILD_NUMBER'              
                sh 'python scripts/generate_npmrc.py $artifactory_apikey'       
                       sh 'ls'                   
       }             
         }              
        stage('Checking copywrite and generating .npmrc file on Windows') {      
                    agent {           
                   label "studioBuild"      
                    }     
                     steps {      
                        // bat 'python scripts/check_copyright.py'                
              bat 'echo %BUILD_NUMBER%'           
                   bat 'python scripts/generate_npmrc.py %artifactory_apikey%'  
                            bat 'dir'        
                  }            
          }           
       }        
      }

        

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              rvsingh011 Ravi Singh
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: