why running a batch file from jenkins spends more time than running the batch file directly

Viewed 101

I am using jenkins to do CI, and in one of my jenkins job's jenkins file I try to run a batch file which is in a slave agent of jenkins (windows 7 OS), and the batch file is as below:

@echo on
"<path1>\eclipse.exe -noSplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data E:\jenkins\build_workspace -cleanBuild <project name>/Debug
exit

and in my jenkinsfile, it is like:

pipeline {
    agent {label "buildserver"} 
        stage {
            script {
                bat 'call <path2>\abc.bat'
            }
        }
}

and total build time is about 16-18 minutes.

but when I login in the build server, and try to run the batch file directly in the command line window, the build process time is about 4-5 minutes.

I do not know what is going on ?

1 Answers
Related