Commit 8b694ab5 authored by Saliou's avatar Saliou

build images

parent f8205aa1
......@@ -15,40 +15,30 @@ pipeline {
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Build and push image') {
stage('Build image') {
steps {
script {
echo 'Build..'
def version = readFile('VERSION')
def versions = version.split('\\.')
def major = versions[0]
def minor = versions[0] + '.' + versions[1]
def patch = version.trim()
docker.withRegistry('', 'dockerhub') {
def image = docker.build('baamtu/docker-demo:master',' -f ./Dockerfile .')
image.push()
}
sh "docker build -t baamtu/docker-demo:master ."
}
}
}
stage('Cleaning up') {
steps {
stage('Push image') {
steps {
sh "docker push baamtu/docker-demo:master"
sh "yes | docker system prune -a"
}
}
}
}
......
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