Browse Source

change pipeline test

amenpunk 4 years ago
parent
commit
54840ad9d5
2 changed files with 23 additions and 5 deletions
  1. 22 4
      Jenkinsfile
  2. 1 1
      src/Components/Home/Candidatos.js

+ 22 - 4
Jenkinsfile

@@ -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}"
         }
     }
 

+ 1 - 1
src/Components/Home/Candidatos.js

@@ -94,7 +94,7 @@ export default function Candidatos () {
                 </div>
                 {
                     users.length ?
-                    users[page - 1] .map( user => (<Candidato key={user.DPI} user={user}/>)) 
+                    users[page - 1].map( user => (<Candidato key={user.DPI} user={user}/>)) 
                     : 
                         <center>
                             <Box sx={{ display: 'flex', padding : '5%',  maginTop : 100,  }}>