Python implementation of the eix database format

Jenkinsfile 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. node {
  2. try {
  3. checkout scm
  4. updateGitlabCommitStatus name: 'jenkins', state: 'running'
  5. docker.withRegistry('https://registry.docks.ercpe.de', 'docker-registry') {
  6. docker.image('python:3.4').inside {
  7. stage("Install dependencies") {
  8. sh "make install_deps"
  9. }
  10. stage("Compile") {
  11. sh "make compile compile_optimized"
  12. }
  13. stage("Run tests") {
  14. sh "make test"
  15. }
  16. stage("Run coverage") {
  17. sh "make coverage"
  18. }
  19. stage("Run pylint") {
  20. sh "pylint -r n --msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}' > pylint-report.txt || true"
  21. }
  22. }
  23. withCredentials([[
  24. $class: 'UsernamePasswordMultiBinding',
  25. credentialsId: 'sonar',
  26. usernameVariable: 'USERNAME',
  27. passwordVariable: 'PASSWORD']]) {
  28. docker.image('ercpe/sonar-scanner:latest').inside {
  29. stage("Run sonar-scanner") {
  30. sh "sonar-scanner -Dsonar.host.url=${SONAR_HOST} -Dsonar.login=${USERNAME} -Dsonar.password=${PASSWORD}"
  31. }
  32. }
  33. }
  34. }
  35. updateGitlabCommitStatus name: 'jenkins', state: 'success'
  36. } catch (e) {
  37. currentBuild.result = "FAILED"
  38. updateGitlabCommitStatus name: 'jenkins', state: 'failed'
  39. notifyFailedBuild()
  40. throw e
  41. }
  42. }
  43. def notifyFailedBuild() {
  44. emailext (
  45. subject: "FAILED: ${env.JOB_NAME} [${env.BUILD_NUMBER}]",
  46. body: """Job ${env.JOB_NAME} [${env.BUILD_NUMBER}] has FAILED: ${env.BUILD_URL}""",
  47. recipientProviders: [[$class: 'CulpritsRecipientProvider']]
  48. )
  49. }