Jenkinsfile 1005 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. pipeline {
  2. agent {
  3. node {
  4. label 'ClubDit'
  5. }
  6. }
  7. stages {
  8. stage('test') {
  9. steps {
  10. sh 'echo pwd'
  11. }
  12. }
  13. stage('install dependencies') {
  14. steps {
  15. nvm( version : '16.13.2' ){
  16. sh 'npm install'
  17. }
  18. }
  19. }
  20. stage('build') {
  21. steps {
  22. nvm( version : '16.13.2' ){
  23. sh 'npm run build'
  24. }
  25. }
  26. }
  27. stage('sync') {
  28. steps {
  29. sh 'rsync -a --delete ./build /var/www/html/psicoadmin'
  30. }
  31. }
  32. }
  33. post {
  34. always {
  35. slackSend channel: '#sysproy2',
  36. color: currentBuild.currentResult == 'SUCCESS' ? 'good' : 'danger',
  37. message: "*${currentBuild.currentResult}:* Job ${env.JOB_NAME} build ${env.BUILD_NUMBER} More info at: ${env.BUILD_URL}"
  38. }
  39. }
  40. }