Skip to content

Commit

Permalink
Merge pull request jenkinsci#91 from slide/master
Browse files Browse the repository at this point in the history
Don't build on trusted and image cleanup
  • Loading branch information
slide authored Oct 10, 2019
2 parents 1dbaeef + bf46af6 commit d36dde0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 7 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ pipeline {
infra.withDockerCredentials {
powershell '& ./make.ps1 publish'
}

powershell '& docker system prune --force --all'
}
}
}
Expand All @@ -45,7 +47,11 @@ pipeline {
timeout(time: 30, unit: 'MINUTES')
}
steps {
sh './build.sh'
script {
if(!infra.isTrusted()) {
sh './build.sh ; docker system prune --force --all'
}
}
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,4 @@ if($lastExitCode -ne 0) {
} else {
Write-Host "Build finished successfully"
}
Write-Host "Cleaning up docker images..."
& docker system prune --force --all
exit $lastExitCode

0 comments on commit d36dde0

Please sign in to comment.