Jenkinsfile 663 B

1234567891011121314151617181920212223242526
  1. node {
  2. // Utiliser la version spécifique de Node.js définie dans Jenkins
  3. tools {
  4. nodejs "NodeJS"
  5. }
  6. stage('Install dependencies') {
  7. sh 'npm install --legacy-peer-deps'
  8. }
  9. stage('Test') {
  10. dir("${env.WORKSPACE}/angular-client") {
  11. sh 'npm i @angular-devkit/build-angular'
  12. try {
  13. sh 'npm run test-ci'
  14. } catch(err) {
  15. sh 'echo TEST FAILED'
  16. junit 'target/surefire-reports/TESTS-TestSuite.xml/*.xml'
  17. throw err
  18. }
  19. }
  20. }
  21. // Autres étapes de construction, déploiement, etc.
  22. }