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