Skip to content

Commit

Permalink
Add gradle cleanup before the checks
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon committed Jun 29, 2022
1 parent a3d26d0 commit ad33c8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/jenkins/jobs/RunGradleCheck_Jenkinsfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@

env | grep JAVA | grep HOME

echo "Stop existing gradledaemon"
echo "Gradle clean cache and stop existing gradledaemon"
./gradlew --stop
find ~/.gradle -type f -name "*.lock" -delete
rm -rf ~/.gradle

echo "Check existing dockercontainer"
docker ps -a
Expand All @@ -59,7 +59,7 @@

echo "Start gradlecheck"
GRADLE_CHECK_STATUS=0
./gradlew check -Dtests.coverage=true --no-daemon --no-scan || GRADLE_CHECK_STATUS=1
./gradlew clean && ./gradlew check -Dtests.coverage=true --no-daemon --no-scan || GRADLE_CHECK_STATUS=1

if [ "$GRADLE_CHECK_STATUS" != 0 ]; then
echo Gradle Check Failed!
Expand Down
6 changes: 3 additions & 3 deletions vars/runGradleCheck.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ void call(Map args = [:]) {
env | grep JAVA | grep HOME
echo "Stop existing gradledaemon"
echo "Gradle clean cache and stop existing gradledaemon"
./gradlew --stop
find ~/.gradle -type f -name "*.lock" -delete
rm -rf ~/.gradle
echo "Check existing dockercontainer"
docker ps -a
Expand All @@ -65,7 +65,7 @@ void call(Map args = [:]) {
echo "Start gradlecheck"
GRADLE_CHECK_STATUS=0
./gradlew check -Dtests.coverage=true --no-daemon --no-scan || GRADLE_CHECK_STATUS=1
./gradlew clean && ./gradlew check -Dtests.coverage=true --no-daemon --no-scan || GRADLE_CHECK_STATUS=1
if [ "\$GRADLE_CHECK_STATUS" != 0 ]; then
echo Gradle Check Failed!
Expand Down

0 comments on commit ad33c8a

Please sign in to comment.