Commit 877ce0cc authored by Marco Ortiz's avatar Marco Ortiz

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

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