testing jenkins docker

This commit is contained in:
Szakalakamaka
2020-09-30 11:43:04 +02:00
parent 5ff513cf17
commit 7c8fe06ea0
2 changed files with 31 additions and 18 deletions

15
Jenkinsfile vendored
View File

@@ -6,7 +6,20 @@ pipeline {
stages {
stage('Build') {
steps {
sh 'docker context create DEV --description \\"connection to DEV environment\\" --docker \\"host=ssh://jenkins@s5000xvn:22\\"'
sh "docker-compose build"
}
}
stage('Deploy') {
steps {
sh "docker-compose up -d"
sh "ssh jenkins@s5000xvn echo 'Dupa dupa dupa'"
sh "docker-compose context DEV up -d"
}
}
stage('Logs') {
steps {
sleep time: 1, unit: 'MINUTES'
sh 'ssh docker logs klaus'
}
}
}