Skip to content

Commit aa59053

Browse files
Setup Gradle properties via environment variables. (#9802)
1 parent 4985d55 commit aa59053

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,11 @@ default:
168168
- source .gitlab/gitlab-utils.sh
169169
# Akka token added to SSM from https://account.akka.io/token
170170
- export ORG_GRADLE_PROJECT_akkaRepositoryToken=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.akka_repo_token --with-decryption --query "Parameter.Value" --out text)
171+
- export ORG_GRADLE_PROJECT_mavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY
172+
- export ORG_GRADLE_PROJECT_gradlePluginProxy=$GRADLE_PLUGIN_PROXY
171173
- mkdir -p .gradle
172-
- export GRADLE_USER_HOME=$(pwd)/.gradle
173-
- |
174-
# Don't put jvm args here as it will be picked up by child gradle processes used in tests
175-
cat << EOF > $GRADLE_USER_HOME/gradle.properties
176-
mavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY
177-
gradlePluginProxy=$GRADLE_PLUGIN_PROXY
178-
EOF
179-
- |
180-
# replace maven central part by MAVEN_REPOSITORY_PROXY in .mvn/wrapper/maven-wrapper.properties
181-
sed -i "s|https://repo.maven.apache.org/maven2/|$MAVEN_REPOSITORY_PROXY|g" .mvn/wrapper/maven-wrapper.properties
174+
# replace maven central part by MAVEN_REPOSITORY_PROXY in .mvn/wrapper/maven-wrapper.properties
175+
- sed -i "s|https://repo.maven.apache.org/maven2/|$MAVEN_REPOSITORY_PROXY|g" .mvn/wrapper/maven-wrapper.properties
182176
- export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xms$GRADLE_MEM -Xmx$GRADLE_MEM -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
183177
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS"
184178
- *normalize_node_index

0 commit comments

Comments
 (0)