Jenkinsfile 985 B

12345678910111213141516171819202122232425262728293031
  1. pipeline{
  2. agent { label 'docker' }
  3. triggers {
  4. pollSCM('H * * * *')
  5. cron('H H H * *')
  6. }
  7. stages{
  8. stage('Build') {
  9. steps {
  10. script {
  11. docker.withRegistry('https://docker.snppla.net', 'nexus_push'){
  12. def customImage = docker.build("docker.snppla.net/snppla/deluge-web:${env.GIT_BRANCH}", "--pull ./")
  13. customImage.push()
  14. }
  15. }
  16. }
  17. }
  18. }
  19. post {
  20. success{
  21. emailext body: "${env.BUILD_URL} was built", to: '$DEFAULT_RECIPIENTS', recipientProviders: [developers()], subject: "Built Pipeline: ${currentBuild.fullDisplayName}"
  22. }
  23. failure{
  24. emailext body: "Something is wrong with ${env.BUILD_URL}", to: '$DEFAULT_RECIPIENTS', recipientProviders: [developers()], subject: "Failed Pipeline: ${currentBuild.fullDisplayName}"
  25. }
  26. fixed
  27. {
  28. emailext body: "The pipeline was fixed with ${env.BUILD_URL}", to: '$DEFAULT_RECIPIENTS', recipientProviders: [developers()], subject: "Pipeline fixed: ${currentBuild.fullDisplayName}"
  29. }
  30. }
  31. }