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
 pipeline {
1
 pipeline {
2
     agent {
2
     agent {
3
         node {
3
         node {
4
-            label 'ClubDit'
4
+            label 'master'
5
         }
5
         }
6
     }
6
     }
7
     stages {
7
     stages {
28
         }
28
         }
29
         stage('deploy') {
29
         stage('deploy') {
30
             steps {
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
     post {
53
     post {
36
         always {
54
         always {
37
             slackSend channel: '#sysproy2',
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
                 </div>
94
                 </div>
95
                 {
95
                 {
96
                     users.length ?
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
                         <center>
99
                         <center>
100
                             <Box sx={{ display: 'flex', padding : '5%',  maginTop : 100,  }}> 
100
                             <Box sx={{ display: 'flex', padding : '5%',  maginTop : 100,  }}>