this is dumb.

This commit is contained in:
Kameron Kenny 2024-05-15 18:55:13 -04:00
parent 0678450906
commit 93e4001b80
No known key found for this signature in database
GPG Key ID: E5006629839D2276
1 changed files with 8 additions and 0 deletions

8
Jenkinsfile vendored
View File

@ -38,6 +38,8 @@ pipeline {
stage('Stop primary container') {
steps {
script {
def status_p = sh(returnStatus: true, script: 'docker images | grep bind9-primary | grep $(grep image docker-compose.yml | grep primary | awk -F\':\' \'{ print $4 }\')')
if (status_p != 0) {
sh 'docker compose down'
sh 'sleep 5'
@ -51,6 +53,8 @@ pipeline {
stage('Start primary container') {
steps {
script {
def status_p = sh(returnStatus: true, script: 'docker images | grep bind9-primary | grep $(grep image docker-compose.yml | grep primary | awk -F\':\' \'{ print $4 }\')')
if (status_p != 0) {
sh 'docker compose down'
sh 'docker compose up -d --no-color primary'
@ -71,6 +75,8 @@ pipeline {
stage('Stop secondary container') {
steps {
script {
def status_s = sh(returnStatus: true, script: 'docker images | grep bind9-secondary | grep $(grep image docker-compose.yml | grep secondary | awk -F\':\' \'{ print $4 }\')')
if (status_s != 0) {
sh 'docker --context pi502 compose down'
sh 'sleep 5'
@ -84,6 +90,8 @@ pipeline {
stage('Start secondary container') {
steps {
script {
def status_s = sh(returnStatus: true, script: 'docker images | grep bind9-secondary | grep $(grep image docker-compose.yml | grep secondary | awk -F\':\' \'{ print $4 }\')')
if (status_s != 0) {
sh 'docker --context pi502 compose up -d --no-color secondary'
sh 'docker --context pi502 compose ps'