Commit 338746fd authored by Marco Ortiz's avatar Marco Ortiz

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

parent df1de34e
pipeline { pipeline {
agent any agent {
dockerfile true
}
environment { environment {
IMAGE = readMavenPom().getArtifactId() IMAGE = readMavenPom().getArtifactId()
VERSION = readMavenPom().getVersion() VERSION = readMavenPom().getVersion()
imagename = "${IMAGE}:${VERSION}" imagename = "bytesw/${IMAGE}:${VERSION}"
url = "http://192.168.27.148:5000" url = "http://192.168.27.148:5000"
tag_name = "192.168.27.148:5000" tag_name = "192.168.27.148:5000"
credentials = "admin-docker-hub" credentials = "admin-docker-hub"
...@@ -74,10 +76,24 @@ pipeline { ...@@ -74,10 +76,24 @@ pipeline {
// } // }
stage('Build Docker Image') { stage('Build Docker Image') {
steps { steps {
withMaven(maven: 'Maven', mavenSettingsConfig: '2ea57b6f-d6f0-42bc-9770-f24d4170a439') { // withMaven(maven: 'Maven', mavenSettingsConfig: '2ea57b6f-d6f0-42bc-9770-f24d4170a439') {
sh 'mvn clean install -P docker' // sh 'mvn clean install -DskipTests -P docker'
} // }
docker.build
} }
} }
// stage('Deploy Image') {
// steps{
// withMaven(maven: 'Maven', mavenSettingsConfig: '2ea57b6f-d6f0-42bc-9770-f24d4170a439') {
// sh 'docker tag '
// }
// }
// }
// stage('Remove Unused docker image') {
// steps{
// sh "docker rmi $tag_name/$imagename:$PACKAGE_VERSION"
// sh "docker rmi $tag_name/$imagename:latest"
// }
// }
} }
} }
\ 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