|
|
@@ -1,7 +1,7 @@
|
|
|
pipeline {
|
|
|
agent {
|
|
|
node {
|
|
|
- label 'ClubDit'
|
|
|
+ label 'master'
|
|
|
}
|
|
|
}
|
|
|
stages {
|
|
|
@@ -28,15 +28,33 @@ pipeline {
|
|
|
}
|
|
|
stage('deploy') {
|
|
|
steps {
|
|
|
- sh 'rsync -av --delete ./build /var/www/html/psicoadmin'
|
|
|
+ script {
|
|
|
+ sshPublisher(
|
|
|
+ continueOnError: false,
|
|
|
+ failOnError: true,
|
|
|
+ publishers: [
|
|
|
+ sshPublisherDesc(
|
|
|
+ configName: "ServerClubDit",
|
|
|
+ verbose: true,
|
|
|
+ transfers: [
|
|
|
+ sshTransfer(
|
|
|
+ sourceFiles: "build/**",
|
|
|
+ removePrefix: "",
|
|
|
+ remoteDirectory: "psicoadmin/",
|
|
|
+ )
|
|
|
+ ]
|
|
|
+ )
|
|
|
+ ]
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
post {
|
|
|
always {
|
|
|
slackSend channel: '#sysproy2',
|
|
|
- color: currentBuild.currentResult == 'SUCCESS' ? 'good' : 'danger',
|
|
|
- message: "*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} More info at: ${env.BUILD_URL}"
|
|
|
+ color: currentBuild.currentResult == 'SUCCESS' ? 'good' : 'danger',
|
|
|
+ message: "*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} More info at: ${env.BUILD_URL}"
|
|
|
}
|
|
|
}
|
|
|
|