Skip to content

Commit bd26241

Browse files
authored
Cache Gradle wrapper in Linux Unit CI (aws#4831)
Try to reduce amount of: ``` Downloading https://services.gradle.org/distributions/gradle-8.9-bin.zip ...... Exception in thread "main" java.net.SocketException: Connection reset ```
1 parent e56ee99 commit bd26241

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

buildspec/linuxTests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.2
33
cache:
44
paths:
55
# - '/root/.gradle/caches/**/*'
6-
- '/root/.gradle/wrapper/**/*'
6+
- '/home/codebuild-user/.gradle/wrapper/**/*'
77

88
env:
99
variables:
@@ -17,6 +17,7 @@ phases:
1717
- dnf install -y acl
1818
- chown -R codebuild-user:codebuild-user /codebuild/output
1919
- chown -R codebuild-user:codebuild-user /codebuild/local-cache
20+
- chown -R codebuild-user:codebuild-user /home/codebuild-user
2021
- setfacl -m d:o::rwx,o::rwx /root
2122
- mkdir /tmp/testArtifacts; chmod 777 /tmp/testArtifacts
2223
- export AWS_CODEARTIFACT_NUGET_LOGFILE=/tmp/testArtifacts/codeArtifactNuGet.log
@@ -35,7 +36,7 @@ phases:
3536
3637
- chmod +x gradlew
3738
- su codebuild-user -c "./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME check coverageReport --info --console plain --continue"
38-
- ./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME buildPlugin
39+
- su codebuild-user -c "./gradlew -PideProfileName=$ALTERNATIVE_IDE_PROFILE_NAME buildPlugin"
3940
- VCS_COMMIT_ID="${CODEBUILD_RESOLVED_SOURCE_VERSION}"
4041
- CI_BUILD_URL=$(echo $CODEBUILD_BUILD_URL | sed 's/#/%23/g') # Encode `#` in the URL because otherwise the url is clipped in the Codecov.io site
4142
- CI_BUILD_ID="${CODEBUILD_BUILD_ID}"

0 commit comments

Comments
 (0)