16:03:47 Started by user unknown or anonymous 16:03:47 Running as SYSTEM 16:03:47 Building in workspace /data/jenkins/workspace/front-v5-web 16:03:47 The recommended git tool is: NONE 16:03:47 using credential e9f27bcd-2741-48e3-b693-e66c2b7b3499 16:03:47 > /usr/local/git/bin/git rev-parse --resolve-git-dir /data/jenkins/workspace/front-v5-web/.git # timeout=10 16:03:47 Fetching changes from the remote Git repository 16:03:47 > /usr/local/git/bin/git config remote.origin.url https://gitlab.arsbaibaodun.com/bcx_front/front-v5-web.git # timeout=10 16:03:47 Fetching upstream changes from https://gitlab.arsbaibaodun.com/bcx_front/front-v5-web.git 16:03:47 > /usr/local/git/bin/git --version # timeout=10 16:03:47 > git --version # 'git version 2.43.0' 16:03:47 using GIT_ASKPASS to set credentials gitlab凭据 16:03:47 > /usr/local/git/bin/git fetch --tags --force --progress -- https://gitlab.arsbaibaodun.com/bcx_front/front-v5-web.git +refs/heads/*:refs/remotes/origin/* # timeout=10 16:03:48 > /usr/local/git/bin/git rev-parse refs/remotes/origin/test^{commit} # timeout=10 16:03:48 Checking out Revision ef3ca60284a8c60ac59d803e128f444859692aaf (refs/remotes/origin/test) 16:03:48 > /usr/local/git/bin/git config core.sparsecheckout # timeout=10 16:03:48 > /usr/local/git/bin/git checkout -f ef3ca60284a8c60ac59d803e128f444859692aaf # timeout=10 16:03:48 Commit message: "Merge branch 'feat-临保保险' into test" 16:03:48 > /usr/local/git/bin/git rev-list --no-walk ef3ca60284a8c60ac59d803e128f444859692aaf # timeout=10 16:03:48 [front-v5-web] $ /bin/sh -xe /data/apache-tomcat-jenkins/temp/jenkins14410252710618872781.sh 16:03:48 + cd /data/jenkins/workspace/front-v5-web 16:03:48 + npm install --force 16:03:48 npm WARN using --force Recommended protections disabled. 16:03:53 16:03:53 up to date in 5s 16:03:53 16:03:53 197 packages are looking for funding 16:03:53 run `npm fund` for details 16:03:53 + npm run build:server 16:03:53 16:03:53 > ant-design-pro@1.1.0 build:server 16:03:53 > cross-env ESLINT=none COMPRESS=true roadhog build 16:03:53 16:03:59 Build failed: Cannot find module 'terser-webpack-plugin' 16:03:59 Require stack: 16:03:59 - /data/jenkins/workspace/front-v5-web/.webpackrc.js 16:03:59 - /data/jenkins/workspace/front-v5-web/node_modules/af-webpack/lib/getUserConfig/index.js 16:03:59 - /data/jenkins/workspace/front-v5-web/node_modules/af-webpack/getUserConfig.js 16:03:59 - /data/jenkins/workspace/front-v5-web/node_modules/roadhog/lib/build.js 16:03:59 - /data/jenkins/workspace/front-v5-web/node_modules/roadhog/lib/scripts/build.js 16:03:59 Error: Cannot find module 'terser-webpack-plugin' 16:03:59 Require stack: 16:03:59 - /data/jenkins/workspace/front-v5-web/.webpackrc.js 16:03:59 - /data/jenkins/workspace/front-v5-web/node_modules/af-webpack/lib/getUserConfig/index.js 16:03:59 - /data/jenkins/workspace/front-v5-web/node_modules/af-webpack/getUserConfig.js 16:03:59 - /data/jenkins/workspace/front-v5-web/node_modules/roadhog/lib/build.js 16:03:59 - /data/jenkins/workspace/front-v5-web/node_modules/roadhog/lib/scripts/build.js 16:03:59 at Function.Module._resolveFilename (node:internal/modules/cjs/loader:940:15) 16:03:59 at Function.Module._load (node:internal/modules/cjs/loader:773:27) 16:03:59 at Module.require (node:internal/modules/cjs/loader:1012:19) 16:03:59 at require (node:internal/modules/cjs/helpers:93:18) 16:03:59 at Object.<anonymous> (/data/jenkins/workspace/front-v5-web/.webpackrc.js:7:22) 16:03:59 at Module._compile (node:internal/modules/cjs/loader:1108:14) 16:03:59 at Module._compile (/data/jenkins/workspace/front-v5-web/node_modules/pirates/lib/index.js:129:24) 16:03:59 at Module._extensions..js (node:internal/modules/cjs/loader:1137:10) 16:03:59 at Object.newLoader [as .js] (/data/jenkins/workspace/front-v5-web/node_modules/pirates/lib/index.js:134:7) 16:03:59 at Module.load (node:internal/modules/cjs/loader:988:32) 16:03:59 at Function.Module._load (node:internal/modules/cjs/loader:828:14) 16:03:59 at Module.require (node:internal/modules/cjs/loader:1012:19) 16:03:59 at require (node:internal/modules/cjs/helpers:93:18) 16:03:59 at getUserConfig (/data/jenkins/workspace/front-v5-web/node_modules/af-webpack/lib/getUserConfig/index.js:116:14) 16:03:59 at /data/jenkins/workspace/front-v5-web/node_modules/roadhog/lib/build.js:53:51 16:03:59 at new Promise (<anonymous>) 16:03:59 at Object._default [as default] (/data/jenkins/workspace/front-v5-web/node_modules/roadhog/lib/build.js:46:10) 16:03:59 at Object.<anonymous> (/data/jenkins/workspace/front-v5-web/node_modules/roadhog/lib/scripts/build.js:22:28) 16:03:59 at Module._compile (node:internal/modules/cjs/loader:1108:14) 16:03:59 at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) 16:03:59 at Module.load (node:internal/modules/cjs/loader:988:32) 16:03:59 at Function.Module._load (node:internal/modules/cjs/loader:828:14) 16:03:59 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) 16:03:59 at node:internal/main/run_main_module:17:47 { 16:03:59 code: 'MODULE_NOT_FOUND', 16:03:59 requireStack: [ 16:03:59 '/data/jenkins/workspace/front-v5-web/.webpackrc.js', 16:03:59 '/data/jenkins/workspace/front-v5-web/node_modules/af-webpack/lib/getUserConfig/index.js', 16:03:59 '/data/jenkins/workspace/front-v5-web/node_modules/af-webpack/getUserConfig.js', 16:03:59 '/data/jenkins/workspace/front-v5-web/node_modules/roadhog/lib/build.js', 16:03:59 '/data/jenkins/workspace/front-v5-web/node_modules/roadhog/lib/scripts/build.js' 16:03:59 ] 16:03:59 } 16:03:59 + rm -rf /data/workspace/attendsweb.test.baibaodun.cn/ 16:03:59 + cp -r /data/jenkins/workspace/front-v5-web/dist/ /data/workspace/attendsweb.test.baibaodun.cn 16:03:59 + scp -r /data/jenkins/workspace/front-v5-web/dist 172.20.0.7:/data/tomcat/apache-tomcat-paspweb/webapps/ 16:04:00 [SSH] script: 16:04:00 ="" 16:04:00 16:04:00 #停止进程 16:04:00 kill -9 $(ps -ef | grep -v grep | grep apache-tomcat-paspweb | awk '{print $2}') 16:04:00 sleep 3 16:04:00 16:04:00 #文件备份 16:04:00 cd /data/tomcat/apache-tomcat-paspweb/ 16:04:00 cp -rf /data/tomcat/apache-tomcat-paspweb/webapps/ROOT /data/tomcat/apache-tomcat-paspweb/backup/ 16:04:00 16:04:00 #删除旧文件 16:04:00 rm -rf /data/tomcat/apache-tomcat-paspweb/webapps/ROOT 16:04:00 16:04:00 #新文件更名 16:04:00 mv /data/tomcat/apache-tomcat-paspweb/webapps/dist /data/tomcat/apache-tomcat-paspweb/webapps/ROOT 16:04:00 sleep 3 16:04:00 16:04:00 #启动应用 16:04:00 sh ./bin/startup.sh 16:04:00 16:04:00 16:04:00 16:04:00 16:04:00 [SSH] executing... 16:04:00 bash: =: command not found 16:04:07 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 16:04:07 At least one of these environment variable is needed to run this program 16:04:07 16:04:07 [SSH] completed 16:04:07 [SSH] exit-status: 1 16:04:07 16:04:07 Build step 'Execute shell script on remote host using ssh' marked build as failure 16:04:07 Finished: FAILURE