38 lines
1.4 KiB
Plaintext
38 lines
1.4 KiB
Plaintext
pipeline {
|
|
agent any
|
|
|
|
stages {
|
|
stage('checkout 代码') {
|
|
steps {
|
|
git branch: 'sit', credentialsId: 'fly_gitlab_auth', url: 'http://172.24.16.20/root/fly_moon.git'
|
|
}
|
|
}
|
|
stage('Maven 编译') {
|
|
steps {
|
|
sh "cd ${WORKSPACE}/ && mvn clean install -P sit -Dmaven.sit.skip=true -pl flymoon-seo -am"
|
|
}
|
|
}
|
|
stage('jar A下线') {
|
|
steps {
|
|
sh "ssh 192.168.70.18 'sh /data/sh/kill_fly_moon_seo.sh'"
|
|
}
|
|
}
|
|
stage('jar A同步') {
|
|
steps {
|
|
sh """
|
|
scp ${WORKSPACE}/flymoon-seo/target/flymoon-seo.jar 192.168.70.18:/data/webapps/flymoon_seo/
|
|
scp ${WORKSPACE}/flymoon-common/target/flymoon-common.jar 192.168.70.18:/data/webapps/flymoon_seo/
|
|
scp ${WORKSPACE}/flymoon-framework/target/flymoon-framework.jar 192.168.70.18:/data/webapps/flymoon_seo/
|
|
scp ${WORKSPACE}/flymoon-system/target/flymoon-system.jar 192.168.70.18:/data/webapps/flymoon_seo/
|
|
|
|
"""
|
|
}
|
|
}
|
|
stage('jar A启动') {
|
|
steps {
|
|
sh "ssh 192.168.70.18 'nohup /data/jdk1.8.0_181/bin/java -jar /data/webapps/flymoon_seo/flymoon-seo.jar --spring.profiles.active=sit >/data/webapps/flymoon_seo/nohup.out 2>&1 &' "
|
|
}
|
|
}
|
|
}
|
|
}
|