|
@@ -0,0 +1,31 @@
|
|
|
+// Powered by Infostretch
|
|
|
+pipeline{
|
|
|
+ agent any
|
|
|
+ triggers {
|
|
|
+ pollSCM('H/15 * * * *')
|
|
|
+ }
|
|
|
+ stages{
|
|
|
+ stage ('openvpn - Checkout') {
|
|
|
+ steps {
|
|
|
+ checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '', url: 'https://git.snppla.net/snppla/openvpn.git']]])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ stage ('openvpn - Build') {
|
|
|
+ steps{
|
|
|
+ // Shell build step
|
|
|
+ sh """
|
|
|
+ docker build . -t $DOCKER_REGISTRY/$DOCKER_USER/$JOB_NAME --pull
|
|
|
+ docker login $DOCKER_REGISTRY/$DOCKER_USER/$JOB_NAME -u $DOCKER_USER -p $DOCKER_PASSWORD
|
|
|
+ docker push docker.snppla.net/snppla/openvpn
|
|
|
+ """
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ post {
|
|
|
+ failure {
|
|
|
+ mail to: "${env.ALERT_EMAIL}",
|
|
|
+ subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
|
|
|
+ body: "Something is wrong with ${env.BUILD_URL}"
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|