Reac front end for psicometric app

Jenkinsfile 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. pipeline {
  2. agent {
  3. node {
  4. label 'ClubDit'
  5. }
  6. }
  7. stages {
  8. stage('install dependencies') {
  9. steps {
  10. nvm( version : '16.13.2' ){
  11. sh 'npm install'
  12. }
  13. }
  14. }
  15. stage('build') {
  16. steps {
  17. nvm( version : '16.13.2' ){
  18. sh 'npm run build'
  19. }
  20. }
  21. }
  22. stage('test') {
  23. steps {
  24. nvm( version : '16.13.2' ){
  25. sh 'npm run test'
  26. }
  27. }
  28. }
  29. stage('deploy') {
  30. steps {
  31. sh 'rsync -av --delete ./build /var/www/html/psicoadmin'
  32. }
  33. }
  34. }
  35. post {
  36. always {
  37. 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}"
  40. }
  41. }
  42. }