Build a cluster node node jenkins

Node Configuration

First, in the system settings need to add a node in jenkins
System Administration => Node Manager => New Node
configured with the same Remote root directory and the main jenkins best path.

Confirm the connection

Second, the need to ensure that the nodes can access the main server Jenkins, GIT depot, warehouse server MAVEN

Installation Components

Required to install jdk, node, npm, git, maven like, and the best version of the installation path and aligned with the main jenkins

Installation nodejs:

yum install -y nodejs

Installation npm:

curl -L https://www.npmjs.com/install.sh | sh

Installation n modules:

npm install -g n

Upgrade nodeJs

Node.js upgrade to the latest stable version of
the n-stable
// such as the n-back can also follow the version number:
the n-v10.15.3
! Handover // npm source is local source (appears npm ERR 404 Not Found: ca-common-setHeader@^1.0 when .7)
RM -rf / Data / Jenkins / Workspace / your_service / the node_modules /
NPM config SET Registry http://198.22.33.44:4873/
// config SET Registry https://registry.npm.taobao.org NPM
NPM config get registry (see source)
// can also be modified vim .npmrc

Setting copy

如果是前端应用,可设置拷贝
dist-test//.
注意 **
如果拷贝目的地是jenkins主机,可设置允许操作的目录
系统管理 -> 全局安全配置 -> Enable Agent -> Master Access Control -> here

配置File Access Rules

allow all /opt/ca-b2b/www/v2/*

Guess you like

Origin www.cnblogs.com/liehen2046/p/11058646.html