24 lines
537 B
Groovy
24 lines
537 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
checkout scm
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
script {
|
|
docker.build('test.trianta.dev:latest')
|
|
}
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
steps {
|
|
sh 'docker stop test && docker rm test || exit 0'
|
|
sh 'docker run -d -p 3466:80 --name test test.trianta.dev:latest'
|
|
}
|
|
}
|
|
}
|
|
}
|