testing jenkins docker
This commit is contained in:
15
Jenkinsfile
vendored
15
Jenkinsfile
vendored
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user