| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 | 
							- // Powered by Infostretch 
 
- pipeline{
 
-     agent any
 
-     options {
 
-         buildDiscarder(logRotator(numToKeepStr: '30'))
 
-     }
 
-     triggers {
 
-         pollSCM('H/15 * * * *')
 
-     }
 
-     stages{
 
-     	stage ('Checkout') {
 
-     	    steps {
 
- 				dir("openvpn"){
 
- 					git 'https://git.snppla.net/snppla/openvpn.git'
 
- 				}
 
-     	    }
 
-     	}
 
-     	stage ('Build') {
 
-     	    steps{
 
- 				dir("openvpn"){
 
- 					// Shell build step
 
- 					sh """ 
 
- 					docker build . -t $DOCKER_REGISTRY/$DOCKER_USER/openvpn:latest --pull
 
- 					docker login $DOCKER_REGISTRY/$DOCKER_USER -u $DOCKER_USER -p $DOCKER_PASSWORD
 
- 					docker push $DOCKER_REGISTRY/$DOCKER_USER/openvpn:latest
 
- 					"""
 
- 				}
 
-     	    }
 
-     	}
 
-     }
 
-     post {
 
-         failure  {
 
-             mail to: "${env.ALERT_EMAIL}",
 
-                  subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
 
-                  body: "Something is wrong with ${env.BUILD_URL}"
 
-         }
 
- 		fixed
 
- 		{
 
- 			mail to: "${env.ALERT_EMAIL}",
 
-                  subject: "Pipeline fixed: ${currentBuild.fullDisplayName}",
 
-                  body: "The pipeline was fixed with ${env.BUILD_URL}"
 
- 		}
 
-     }
 
- }
 
 
  |