Jenkins 安装与配置
- 0
#讨论区
00条评论
实时对话
loading...
使用docker安装jenkins
bash
获取密码
bash
4. 插件安装
Generic Webhook Trigger
Publish over SSH
nodejs
ssh
Maven Integration
#Generic Webhook Trigger配置
^(refs/heads/master)_(jello-web)$
$ref_$name
jar包进程脚本
bash
bash
bash
一次性设置,重启无效
System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone','Asia/Shanghai')
永久设置
bash
docker run -d -u root -v jenkins_home:/var/jenkins_home -v $(which docker):/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -p 8080:8080 --restart=always jenkins/jenkins:lts-jdk11
docker ps
docker exec -u 0 -it container_id /bin/bash
cat /var/jenkins_home/secrets/initialAdminPassword
#!/bin/bash
SERVER_NAME=jello
JAR_NAME=jello-0.0.1-SNAPSHOT
echo "查询进程id-->$SERVER_NAME"
PID=`ps -ef | grep "$SERVER_NAME" | grep -v grep | awk '{print $2}'`
echo "得到进程ID:$PID"
echo "结束进程"
for id in $PID
do
kill -9 $id
echo "killed $id"
done
echo "结束进程完成"
cd /www/wwwroot/api.jello.annyyy.com/
chmod 755 $JAR_NAME.jar
nohup java -jar $JAR_NAME.jar &
echo '执行完了构建'
npm ci
npm run build
tar -czvf dist.tar.gz \.next env public package.json \.npmrc
nohup java -jar test.jar >start.log 2>&1 &
docker exec -it -u root container_id bash
cat /etc/timezone
echo 'Asia/Shanghai' > /etc/timezone