Commit 951ae4c6 authored by Marco Ortiz's avatar Marco Ortiz

Preparación para la integración con el nuevo jenkins

parent fc065178
...@@ -75,6 +75,9 @@ pipeline { ...@@ -75,6 +75,9 @@ pipeline {
} }
} }
stage('Build Docker Image') { stage('Build Docker Image') {
when {
expression { include_docker == 'yes' }
}
steps { steps {
withMaven(maven: 'Maven', mavenSettingsConfig: '2ea57b6f-d6f0-42bc-9770-f24d4170a439') { withMaven(maven: 'Maven', mavenSettingsConfig: '2ea57b6f-d6f0-42bc-9770-f24d4170a439') {
sh 'mvn clean install -DskipTests -P docker' sh 'mvn clean install -DskipTests -P docker'
...@@ -100,9 +103,20 @@ pipeline { ...@@ -100,9 +103,20 @@ pipeline {
expression { include_docker == 'yes' } expression { include_docker == 'yes' }
} }
steps { steps {
sh "docker rmi ${imagename}:latest" sh "docker rmi ${imagenam1e}:latest"
sh "docker rmi ${imagename}:${VERSION}" sh "docker rmi ${imagename}:${VERSION}"
} }
} }
} }
post {
always {
echo 'I will always say Hello again!'
emailext body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}",
recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}"
}
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment