初始化提交
This commit is contained in:
48
jenkins/流水线配置/sit_fly_moon_email.conf
Normal file
48
jenkins/流水线配置/sit_fly_moon_email.conf
Normal file
@@ -0,0 +1,48 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
stages {
|
||||
stage('checkout 代码') {
|
||||
steps {
|
||||
git branch: 'sit', credentialsId: 'fly_gitlab_auth', url: 'http://172.24.16.20/root/fly_moon_email.git'
|
||||
}
|
||||
}
|
||||
stage('Maven 编译') {
|
||||
steps {
|
||||
sh "cd ${WORKSPACE}/ && mvn clean install -Dmaven.test.skip=true -Pcn"
|
||||
}
|
||||
}
|
||||
stage('jar 下线') {
|
||||
steps {
|
||||
echo ("下线")
|
||||
sh "ssh 192.168.70.18 'sh /data/sh/kill_fly_moon_email.sh' "
|
||||
}
|
||||
}
|
||||
stage('jar 同步') {
|
||||
steps {
|
||||
echo ("同步")
|
||||
sh """
|
||||
//scp ${WORKSPACE}/start/target/start-0.0.1-SNAPSHOT.jar 192.168.70.18:/data/webapps/fly-moon-email_v2/fly-moon-email-test.jar
|
||||
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('jar 启动') {
|
||||
steps {
|
||||
echo ("启动")
|
||||
// sh "ssh 192.168.70.18 'nohup /data/jdk1.8.0_181/bin/java -jar /data/webapps/fly-moon-email/fly-moon-email-test.jar -Xmx8g --spring.profiles.active=sit-cn >/dev/null 2>&1 &' "
|
||||
sh """
|
||||
ssh 192.168.70.18 '
|
||||
nohup /data/jdk1.8.0_181/bin/java -jar /data/webapps/fly_moon_email/fly-moon-email-prod.jar --spring.profiles.active=sit-cn >/dev/null 2>&1 &
|
||||
'
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user