Jenkinsfile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. pipeline {
  2. agent none
  3. triggers {
  4. pollSCM 'H/10 * * * *'
  5. }
  6. options {
  7. disableConcurrentBuilds()
  8. buildDiscarder(logRotator(numToKeepStr: '14'))
  9. }
  10. stages {
  11. stage("test: baseline (jdk17)") {
  12. agent {
  13. docker {
  14. image 'harbor-repo.vmware.com/dockerhub-proxy-cache/library/adoptopenjdk/openjdk17:latest'
  15. args '-v $HOME/.m2:/tmp/jenkins-home/.m2'
  16. }
  17. }
  18. options { timeout(time: 30, unit: 'MINUTES') }
  19. steps {
  20. sh 'test/run.sh'
  21. }
  22. }
  23. }
  24. post {
  25. changed {
  26. script {
  27. slackSend(
  28. color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger',
  29. channel: '#sagan-content',
  30. message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}")
  31. emailext(
  32. subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}",
  33. mimeType: 'text/html',
  34. recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']],
  35. body: "<a href=\"${env.BUILD_URL}\">${currentBuild.fullDisplayName} is reported as ${currentBuild.currentResult}</a>")
  36. }
  37. }
  38. }
  39. }