убрал лишние шаги
Hedgehog_server_CI/ServerMonitorBot/pipeline/head This commit looks good Details
Hedgehog_server_CI/ServerMonitorBot/pipeline/pr-master This commit looks good Details

pull/31/head
L_DelOff 2023-11-22 11:32:44 +03:00
parent 180e1e6be4
commit 2b8a5f326c
1 changed files with 0 additions and 19 deletions

View File

@ -5,30 +5,11 @@ pipeline {
args '-v /root/.m2:/root/.m2' args '-v /root/.m2:/root/.m2'
} }
} }
environment {
SSH_HOST = credentials('ROCK_PI_5_SSH_HOST')
SSH_PORT = credentials('ROCK_PI_5_SSH_PORT')
SSH_USER = credentials('ROCK_PI_5_SSH_USER')
SSH_PASS = credentials('ROCK_PI_5_SSH_PASS')
}
stages { stages {
stage('Init container') {
steps {
sh 'apt-get update && apt-get install -y sshpass openssh-client'
}
}
stage('Build') { stage('Build') {
steps { steps {
sh 'mvn -B -DskipTests -X clean package spring-boot:repackage' sh 'mvn -B -DskipTests -X clean package spring-boot:repackage'
} }
} }
stage('Prune images') {
steps {
sh """
sshpass -p ${SSH_PASS} ssh -o StrictHostKeyChecking=no ${SSH_USER}@${SSH_HOST} -p ${SSH_PORT} 'docker image prune -f'
"""
}
}
} }
} }