当前位置:网站首页>【DevOps】jekins配置(二)
【DevOps】jekins配置(二)
2022-08-09 14:11:00 【渐暖°】
配置环境

配置java

whereis java // 显示java根目录


添加git

如果没有git 下载git
yum install -y git
配置maven
新建项目

选择maven项目
依次配置
源码管理,根据需要选择,我是Git
增加用户名密码方便拉取代码

打包
clean package -U -Dmaven.test.skip=true -P local
执行脚本(本地)
BUILD_ID=DONTKILLME
echo "当前操作人"
whoami
echo "当前目录"
pwd
cd /app/project/croot_rims/package/webserver
cp -f croot_rims_origin-1.0.0-SNAPSHOT.jar /app/project/croot_rims/package/webserver/back
rm -rf /back/*.jar
cd /var/lib/jenkins/workspace/rims-psa-test/target/
cp -f croot_rims_origin-1.0.0-SNAPSHOT.jar /app/project/croot_rims/package/webserver
cd /app/project/croot_rims/package/webserver
sh ./restart.sh
echo "构建成功!!!"
修改jenkins权限
[FATAL] Non-resolvable parent POM for com.buyside.croot:croot_rims_origin:1.0.0-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.3.5.RELEASE from/to nexus-croot (http://192.168.1.56:8081/repository/croot-public): /app/repository/org/springframework/boot/spring-boot-starter-parent/2.3.5.RELEASE/spring-boot-starter-parent-2.3.5.RELEASE.pom.part.lock (权限不够) and ‘parent.relativePath’ points at no local POM @ line 25, column 13
权限不够没办法拉取maven jar包,升级权限即可
vi /etc/sysconfig/jenkins
# Unix user account that runs the Jenkins daemon
# Be careful when you change this, as you need to update
# permissions of $JENKINS_HOME and /var/log/jenkins.
#
JENKINS_USER="jenkins"
修改为JENKINS_USER=“root”
重启
systemctl restart jenkins
边栏推荐
- Regular expression combat: the latest Douban top250 crawler super detailed tutorial
- Simulink simulation pid control servo system
- Item 37: Make std::threads unjoinable on all paths.
- 青蛙跳台阶
- *1-2 OJ 190 run-length code
- 升级适配AGP 7.0
- Recursive implementation of the Tower of Hanoi problem
- RHCE Course Summary
- *4-2 CCF 2014-12-2 zigzag scan
- Shell course summary
猜你喜欢
随机推荐
同步锁synchronized追本溯源
升级适配AGP 7.0
Zero Time Technology | Nomad cross-chain bridge theft of 180 million US dollars incident analysis
Assembly language learning (5)
resNet_model—定义残差网络模型
#25-1 OJ 78 Calculate birthday day of the week
*3-1 CCF 2014-09-1 Adjacent pairs
[manjaro]更新后内核文件加载失败
Which applet making software is easy to use?how to choose?
RHCE课程总结
dpkg:错误:无法新建文件 ‘/var/lib/dpkg/info/format-new’: 没
从零开始Blazor Server(9)--修改Layout
【视频编码学习】——SAD和SATD
Several common registries and their differences
VSTO踩坑记录(2)- 运用outlook对象模型发送邮件
table中 You may have an infinite update loop in a component render function问题解决
The code implementation of chess
不要小看一个Redis!从头到尾全是精华,阿里Redis速成笔记太香了
论文笔记CIRS
JVM如何判断对象无用









