我正在尝试配置 Jenkins 以使用 NodeJS 插件构建我的代码。我已经安装了 NodeJS 插件,但是 NodeJS 安装在系统配置中不可用。
ManageJenkins -> Configure System -> NodeJS 安装(不可用)
我在本地主机上运行詹金斯。
我能做些什么来解决这个问题?
我正在尝试在 Jenkins 上配置我的项目,以便每次提交都会导致自动构建。当我yarn install使用 Jenkins NodeJS 脚本运行时,它拒绝安装从 git 存储库导入的依赖项。我正在按照以下方式进行操作。
"some-component": "git+https://bitbucket.org/owner/repo.git"
Run Code Online (Sandbox Code Playgroud)
它显示以下错误:
error Command failed.
Exit code: 128
Command: git
Arguments: clone git+https://bitbucket.org/owner/repo.git
Output:
fatal: destination path 'some path' already exists and is not an empty directory.
error Command failed with exit code 1.
Run Code Online (Sandbox Code Playgroud)
如果文件为空,则显示以下错误
error Couldn't find the binary git
error Command failed with exit code 1.
Run Code Online (Sandbox Code Playgroud)
尽管同样yarn install可以在 IDE(例如 VS Code)上完美运行。
yarn install我使用以下代码在 Jenkins 上的 NodeJS 脚本中执行
var exec = require('child_process').exec,
child;
child …Run Code Online (Sandbox Code Playgroud)