Files

42 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2025-10-07 15:58:15 +08:00
pipeline {
agent any
tools{
maven 'mvn3.8.8'
jdk 'jdk21'
}
stages {
stage('checkout 代码') {
steps {
git branch: 'sit', credentialsId: 'fly_gitlab_auth', url: 'http://172.24.16.20/root/fly_moon_feishu_auto.git'
}
}
stage('Maven 编译') {
steps {
sh "cd ${WORKSPACE}/ && mvn clean install -Dmaven.test.skip=true"
}
}
stage('jar A下线') {
steps {
echo("1")
sh """ssh 172.24.16.13 'sh /data/sh/kill_fly_moon_feishu_auto.sh' """
}
}
stage('jar A同步') {
steps {
echo("2")
sh """
scp ${WORKSPACE}/target/feishu_auto-0.0.1-SNAPSHOT.jar 172.24.16.13:/data/webapps/fly-moon-feishu-auto/fly_moon_feishu_auto.jar
"""
}
}
stage('jar A启动') {
steps {
echo("3")
sh """ssh 172.24.16.13 'nohup /data/jdk-21.0.7/bin/java -jar /data/webapps/fly-moon-feishu-auto/fly_moon_feishu_auto.jar >/dev/null 2>&1 &' """
}
}
}
}