Commit b4f5b77c authored by Cristian Aguirre's avatar Cristian Aguirre

Add Jenkinsfile

parent 6e8362cf
pipeline {
agent any
environment {
IMAGE = "css-engine-python-cusca-bank"
VERSION = "1.0.0"
url = "http://192.168.27.148:5000"
tag_name = "192.168.27.148:5000"
imagename = "${tag_name}/bytesw/css/${IMAGE}"
credentials = "admin-docker-hub"
}
stages {
stage('Deploy Image') {
steps{
script {
docker.withRegistry(url, credentials ) {
sh "docker build -t ${IMAGE}:${VERSION} ."
sh "docker tag ${IMAGE}:${VERSION} ${imagename}:${VERSION}"
sh "docker push ${imagename}:${VERSION}"
sh "docker tag ${imagename}:${VERSION} ${imagename}:latest"
sh "docker push ${imagename}:latest"
}
}
}
}
}
}
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