| 123456789101112131415161718192021222324252627282930313233 | 
							- pipeline{
 
- 	agent any
 
- 	triggers {
 
- 		pollSCM('H * * * *')
 
- 		cron('H H H * *')
 
- 	}
 
- 	node('docker'){
 
- 		stages{
 
- 			stage('Build') {
 
- 				steps {
 
- 					script {
 
- 						docker.withRegistry('https://docker.snppla.net', 'nexus_push'){
 
- 							def customImage = docker.build("docker.snppla.net/snppla/gogs-docker:${env.GIT_BRANCH}", "--pull ./")
 
- 							customImage.push()
 
- 						}
 
- 					}
 
- 				}
 
- 			}
 
- 		}
 
- 	}
 
- 	post {
 
- 		success{
 
- 			emailext body: "${env.BUILD_URL} was built", to: '$DEFAULT_RECIPIENTS', recipientProviders: [developers()], subject: "Built Pipeline: ${currentBuild.fullDisplayName}"
 
- 		}
 
- 		failure{
 
- 			emailext body: "Something is wrong with ${env.BUILD_URL}", to: '$DEFAULT_RECIPIENTS', recipientProviders: [developers()], subject: "Failed Pipeline: ${currentBuild.fullDisplayName}"
 
- 		}
 
- 		fixed
 
- 		{
 
- 			emailext body: "The pipeline was fixed with ${env.BUILD_URL}", to: '$DEFAULT_RECIPIENTS', recipientProviders: [developers()], subject: "Pipeline fixed: ${currentBuild.fullDisplayName}"
 
- 		}
 
- 	}
 
- }
 
 
  |