【java】jenkins构建报错,如下
凭证有了,环境也有了
Started by user [admin](http://119.29.93.144:8080/user/admin)Started by user [admin](http://119.29.93.144:8080/user/admin)
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/test1
using credential be94da69-1402-4f15-ab98-28d8fea49a12
> /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /usr/bin/git config remote.origin.url [https://gitee.com/pengrongjie/npm04](https://gitee.com/pengrongjie/npm04) # timeout=10
Fetching upstream changes from [https://gitee.com/pengrongjie/npm04](https://gitee.com/pengrongjie/npm04)
> /usr/bin/git --version # timeout=10
using GIT\_ASKPASS to set credentials
> /usr/bin/git fetch --tags --progress [https://gitee.com/pengrongjie/npm04](https://gitee.com/pengrongjie/npm04) +refs/heads/\*:refs/remotes/origin/\* # timeout=10
> /usr/bin/git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> /usr/bin/git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision e35f20952b41568be4bbc416341a338bba72ba28 (refs/remotes/origin/master)
> /usr/bin/git config core.sparsecheckout # timeout=10
> /usr/bin/git checkout -f e35f20952b41568be4bbc416341a338bba72ba28 # timeout=10
Commit message: "33"
> /usr/bin/git rev-list --no-walk e35f20952b41568be4bbc416341a338bba72ba28 # timeout=10
\[test1\] $ bash -c "test -f $HOME/.nvm/nvm.sh"
NVM is already installed
\[test1\] $ bash -c "export > env.txt"
\[test1\] $ bash -c "NVM\_DIR=$HOME/.nvm && source $NVM\_DIR/nvm.sh --no-use && NVM\_NODEJS\_ORG\_MIRROR=[https://nodejs.org/dist](https://nodejs.org/dist) nvm install 8.4.0 && nvm use 8.4.0 && export > env.txt"
v8.4.0 is already installed.
Now using node v8.4.0 (npm v5.3.0)
Now using node v8.4.0 (npm v5.3.0)
\[test1\] $ /bin/sh -xe /tmp/jenkins1195972531114758939.sh
/tmp/jenkins1195972531114758939.sh: line 6: syntax error: unexpected end of file
Build step 'Execute shell' marked build as failure
Finished: FAILURE
回答
看错误信息,shell脚本有问题,你看下这个有没有用,https://blog.csdn.net/GentleL...;
以上是 【java】jenkins构建报错,如下 的全部内容, 来源链接: utcz.com/a/74815.html