Browse Source

change pipeline test

amenpunk 3 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 @@
1 1
 pipeline {
2 2
     agent {
3 3
         node {
4
-            label 'ClubDit'
4
+            label 'master'
5 5
         }
6 6
     }
7 7
     stages {
@@ -28,15 +28,33 @@ pipeline {
28 28
         }
29 29
         stage('deploy') {
30 30
             steps {
31
-                sh 'rsync -av --delete ./build  /var/www/html/psicoadmin'
31
+                script {
32
+                    sshPublisher(
33
+                        continueOnError: false, 
34
+                        failOnError: true,
35
+                        publishers: [
36
+                            sshPublisherDesc(
37
+                                configName: "ServerClubDit",
38
+                                verbose: true,
39
+                                transfers: [
40
+                                    sshTransfer(
41
+                                        sourceFiles: "build/**",
42
+                                        removePrefix: "",
43
+                                        remoteDirectory: "psicoadmin/",
44
+                                    )
45
+                                ]
46
+                            )
47
+                        ]
48
+                    )
49
+                }
32 50
             }
33 51
         }
34 52
     }
35 53
     post {
36 54
         always {
37 55
             slackSend channel: '#sysproy2',
38
-                color: currentBuild.currentResult == 'SUCCESS' ? 'good' : 'danger',
39
-                message: "*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} More info at: ${env.BUILD_URL}"
56
+                      color: currentBuild.currentResult == 'SUCCESS' ? 'good' : 'danger',
57
+                      message: "*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} More info at: ${env.BUILD_URL}"
40 58
         }
41 59
     }
42 60
 

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

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