Jenkinsfile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. def FAILURE_STAGE
  2. pipeline {
  3. agent any
  4. stages {
  5. stage('Clone repo') {
  6. steps {
  7. script{
  8. FAILURE_STAGE=env.STAGE_NAME
  9. }
  10. cleanWs()
  11. git credentialsId: 'gitlab', url: 'https://gitlab.seis.exa2pro.iti.gr/exa2pro/starpu.git', branch: 'fpga'
  12. }
  13. }
  14. stage('Build') {
  15. steps {
  16. script{
  17. FAILURE_STAGE=env.STAGE_NAME
  18. }
  19. sh '''
  20. ls
  21. ./autogen.sh
  22. ./configure --prefix=/home/theioak/.jenkins/workspace/starpu_pipeline/lib --disable-build-examples
  23. make
  24. make install
  25. '''
  26. }
  27. }
  28. stage('Test') {
  29. steps {
  30. script{
  31. FAILURE_STAGE=env.STAGE_NAME
  32. }
  33. sh '''
  34. pwd
  35. ls
  36. git branch
  37. find . -type f -name Makefile -exec sed -i "s:MPIEXEC_ARGS = :MPIEXEC_ARGS = --allow-run-as-root:" {} \\;
  38. make check
  39. '''
  40. }
  41. }
  42. }
  43. post {
  44. success {
  45. mail bcc: '', body: "<b>Build status: Success</b><br>Jenkins pipeline: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> GitLab project: starpu <br> Branch: ft_checkpoint", cc: '', from: 'jenkins@gitlab.seis.iti.gr', replyTo: '', subject: "JENKINS EMAIL NOTIFICATION: Project name -> ${env.JOB_NAME}", to: 'theioak@iti.gr,samuel.thibault@inria.fr', charset: 'UTF-8', mimeType: 'text/html'
  46. }
  47. failure {
  48. mail bcc: '', body: "<b>Build status: Failed</b><br>Jenkins pipeline: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> GitLab project: starpu <br> Branch: ft_checkpoint", cc: '', charset: 'UTF-8', from: 'jenkins@gitlab.seis.iti.gr', mimeType: 'text/html', replyTo: '', subject: "JENKINS EMAIL NOTIFICATION (CI ERROR): Project name -> ${env.JOB_NAME}", to: "theioak@iti.gr,samuel.thibault@inria.fr"
  49. }
  50. }
  51. }