30 lines
No EOL
480 B
Groovy
30 lines
No EOL
480 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Build') {
|
|
steps {
|
|
sh '''docker build .
|
|
|
|
|
|
|
|
&&
|
|
|
|
docker tag gempbotgo_gempbotgo gempir/gempbotgo:latest
|
|
&& docker push gempir/gempbotgo
|
|
'''
|
|
}
|
|
}
|
|
stage('Prepare Env') {
|
|
steps {
|
|
sh 'cp ./prod.yml /home/gempir/gempbotgo'
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
steps {
|
|
sh '''cd /home/gempir/gempbotgo
|
|
docker-compose -f prod.yml pull
|
|
docker-compose -f prod.yml up -d'''
|
|
}
|
|
}
|
|
}
|
|
} |