jenkins 搭建 使用node 发版
yum -y install net-tools
yum -y install net-tools-2.0-0.25.20131004git.el7.x86_64.rpm
tar zxvf jdk-8u271-linux-x64.tar.gz -C /usr/local/
tar xvf apache-maven-3.8.6-bin.tar.gz /usr/local/
tar xvf apache-maven-3.8.6-bin.tar.gz -C /usr/local/
mv apache-maven-3.8.6 maven
java -jar jenkins.war &
登录jenkins 配置
配置插件源
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json
vim /var/lib/jenkins/updates/default.json
%s+/www.google.com/+/www.baidu.com/
%s+/updates.jenkins.io/download/ + /mirrors.tuna.tsinghua.edu.cn/jenkins/
安装git 插件
如果要大jar 注意安装maven 插件
mv node-v14.0.0-linux-x64 node
ln -s /usr/local/node/bin/* /usr/bin/
npm -v
node -v
ln -s /usr/bin/ /usr/local/maven/bin/*
ln -s /usr/local/maven/bin/* /usr/bin/
cd maven/
cd /root/.jenkins/
mv node
ssh-keygen -t rsa -C 'test@qq.com'
cd ~
cd .ssh/
cat id_rsa.pub #j将公钥配置到git
git clone git@git.server.oigbuy.com:oig-fore-end/prediction-replenishment.git
npm install -g cnpm --registry=https://registry.npmmirror.com #cnpm 仓库源配置
npm config set registry https://registry.npmmirror.com
npm cache clean --force
git clone git@git.server.oigbuy.com:oig-fore-end/prediction-replenishment.git
npm i -g node-gyp
yum -y install python3
npm install --unsafe-perm
npm run build:prod --unsafe-perm
yum -y install zip
yum -y install unzip
jenkins配置