Skip to content

Commit

Permalink
Merge pull request #2267 from prefeiturasp/rodrigodiaspilotogalvao-pa…
Browse files Browse the repository at this point in the history
…tch-3

Update Jenkinsfile
  • Loading branch information
rodrigodiaspilotogalvao authored Aug 22, 2023
2 parents f6a1183 + c28397d commit 5e1e414
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,28 @@ pipeline {
withCredentials([file(credentialsId: "${kubeconfig}", variable: 'config')]){

if ( env.branchname == 'homolog-r2' ) {
sh('rm -f '+"$home"+'/.kube/config')
sh('cp $config '+"$home"+'/.kube/config')
sh 'kubectl rollout restart deployment/ptrf-backend -n sme-ptrf-hom2'
sh 'kubectl rollout restart deployment/ptrf-celery -n sme-ptrf-hom2'
sh 'kubectl rollout restart deployment/ptrf-flower -n sme-ptrf-hom2'
sh('rm -f '+"$home"+'/.kube/config')
}
else if( env.branchname == 'atualizarpython' ){
sh('rm -f '+"$home"+'/.kube/config')
sh('cp $config '+"$home"+'/.kube/config')
sh 'kubectl rollout restart deployment/sigescolapre-backend -n sme-sigescola-pre'
sh 'kubectl rollout restart deployment/sigescolapre-celery -n sme-sigescola-pre'
sh 'kubectl rollout restart deployment/sigescolapre-flower -n sme-sigescola-pre'
sh('rm -f '+"$home"+'/.kube/config')
}
else {
sh('rm -f '+"$home"+'/.kube/config')
sh('cp $config '+"$home"+'/.kube/config')
sh 'kubectl rollout restart deployment/ptrf-backend -n sme-ptrf'
sh 'kubectl rollout restart deployment/ptrf-celery -n sme-ptrf'
sh 'kubectl rollout restart deployment/ptrf-flower -n sme-ptrf'
sh('rm -f '+"$home"+'/.kube/config')
}
}
}
Expand Down

0 comments on commit 5e1e414

Please sign in to comment.