thelinux.pro/Jenkinsfile

48 lines
966 B
Groovy

pipeline {
agent {
label 'pi501.in.thelinuxpro.net'
}
stages {
stage("verify tooling") {
steps {
sh '''
docker version
docker info
docker compose version
'''
}
}
stage("Build Containers and push to registry") {
steps {
script {
sh 'docker build -t docker-registry1.in.thelinuxpro.net:5000/sites/thelinux.pro:0.0.1 . --push'
}
}
}
stage("Tag image as latest") {
steps {
script {
sh 'docker tag docker-registry1.in.thelinuxpro.net:5000/sites/thelinux.pro:0.0.1 docker-registry1.in.thelinuxpro.net:5000/sites/thelinux.pro:latest'
}
}
}
stage("push latest tag") {
steps {
script {
sh 'docker image push docker-registry1.in.thelinuxpro.net:5000/sites/thelinux.pro:latest'
}
}
}
stage("Start web1 container") {
steps {
sh 'docker compose up -d --no-color'
}
}
}
}