Skip to content

Commit

Permalink
corrected docker check
Browse files Browse the repository at this point in the history
  • Loading branch information
mattisafur committed Aug 14, 2024
1 parent 2f7a841 commit 4efdd4d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ pipeline {
stage('Build') {
steps{
// check is docker is installled
def dockerStatus = sh(script: 'docker --version', returnStatus: true)
if(dockerStatus != 0) {
error('Docker is not installed on the node')
script {
def dockerStatus = sh(script: 'docker --version', returnStatus: true)
if(dockerStatus != 0) {
error('Docker is not installed on the node')
}
}

// build docker container
Expand Down

0 comments on commit 4efdd4d

Please sign in to comment.