Skip to content

Commit

Permalink
Make docker command detection consistently across OSes (#254)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Jul 26, 2023
1 parent 8776b89 commit 5b00d67
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jacocoTestReport {
}
}

String version = '5.2.0'
String version = '5.3.0'

task updateVersion {
doLast {
Expand Down
4 changes: 2 additions & 2 deletions tests/jenkins/jobs/RunGradleCheck_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
./gradlew --stop
rm -rf ~/.gradle

if ! (uname -s | grep -i NT); then
if command -v docker > /dev/null; then
echo "Check existing dockercontainer"
docker ps -a
docker stop `docker ps -qa` > /dev/null 2>&1 || echo
docker rm `docker ps -qa` > /dev/null 2>&1 || echo
docker rm --force `docker ps -qa` > /dev/null 2>&1 || echo
echo "Stop existing dockercontainer"
docker ps -a

Expand Down
4 changes: 2 additions & 2 deletions vars/runGradleCheck.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ void call(Map args = [:]) {
./gradlew --stop
rm -rf ~/.gradle
if ! (uname -s | grep -i NT); then
if command -v docker > /dev/null; then
echo "Check existing dockercontainer"
docker ps -a
docker stop `docker ps -qa` > /dev/null 2>&1 || echo
docker rm `docker ps -qa` > /dev/null 2>&1 || echo
docker rm --force `docker ps -qa` > /dev/null 2>&1 || echo
echo "Stop existing dockercontainer"
docker ps -a
Expand Down

0 comments on commit 5b00d67

Please sign in to comment.