add contexts

This commit is contained in:
Kameron Kenny 2024-05-13 09:27:03 -04:00
parent 22d231b9c1
commit 07776fb1f0
No known key found for this signature in database
GPG Key ID: E5006629839D2276
1 changed files with 4 additions and 0 deletions

4
Jenkinsfile vendored
View File

@ -26,6 +26,10 @@ pipeline {
sh 'docker compose ps' sh 'docker compose ps'
} }
} }
stage('Create contexts') {
steps {
sh 'docker context ls | grep pi502 || docker context create pi502 --docker "host=ssh://pi502.in.thelinuxpro.net"'
}
stage('Start secondary container') { stage('Start secondary container') {
steps { steps {
sh 'docker --context pi502 compose up -d --no-color secondary' sh 'docker --context pi502 compose up -d --no-color secondary'