Skip to content

Commit 5316d23

Browse files
fix permissions for cache (#6939)
1 parent 9821e02 commit 5316d23

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.gitlab-ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ cache: &default_cache
4848
image: ghcr.io/datadog/dd-trace-java-docker-build:v23.10-base
4949
before_script:
5050
- export GRADLE_USER_HOME=`pwd`/.gradle
51+
# for weird reasons, gradle will always "chmod 700" the .gradle folder
52+
# with Gitlab caching, .gradle is always owned by root and thus gradle's chmod invocation fails
53+
# This dance is a hack to have .gradle owned by the Gitlab runner user
54+
- mkdir -p .gradle
55+
- cp -r .gradle .gradle-copy
56+
- rm -rf .gradle
57+
- mv .gradle-copy .gradle
58+
- ls -la
5159

5260
build: &build
5361
<<: *gradle_build

0 commit comments

Comments
 (0)