Skip to content

Commit

Permalink
Create settings.xml with remote cache auth
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbertrand committed May 2, 2023
1 parent 53a0e6e commit 124a802
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ jobs:
with:
java-version: '8'
distribution: 'temurin'
server-id: cache
server-username: GRADLE_ENTERPRISE_REMOTE_CACHE_USER
server-password: GRADLE_ENTERPRISE_ACCESS_KEY
- name: Build with Maven
run: ./mvnw clean verify -B -Dmaven.build.cache.remote.save.enabled=true -Daether.connector.http.preemptiveAuth=true
run: cat ~/.m2/settings.xml && ./mvnw clean verify -B -Dmaven.build.cache.remote.save.enabled=true
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
GRADLE_ENTERPRISE_REMOTE_CACHE_USER: '' # Required to be empty when using access token to authenticate
7 changes: 6 additions & 1 deletion .mvn/gradle-enterprise.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns="https://www.gradle.com/gradle-enterprise-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/gradle-enterprise-maven https://www.gradle.com/schema/gradle-enterprise-maven.xsd">
<server>
<url>https://ge.solutions-team.gradle.com</url>
<url>https://ge.solutions-team.gradle.com/</url>
<allowUntrusted>false</allowUntrusted>
</server>
<buildScan>
Expand All @@ -18,4 +18,9 @@
<ipAddresses>#{{'0.0.0.0'}}</ipAddresses>
</obfuscation>
</buildScan>
<buildCache>
<remote>
<enabled>true</enabled>
</remote>
</buildCache>
</gradleEnterprise>
5 changes: 2 additions & 3 deletions .mvn/maven-build-cache-config.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd">
<cache>
<configuration>
<enabled>true</enabled>
<remote enabled="true" saveToRemote="false" id="cache">
<remote enabled="true" saveToRemote="true" id="cache">
<url>https://ge.solutions-team.gradle.com/cache-maven</url>
</remote>
</configuration>
Expand Down

0 comments on commit 124a802

Please sign in to comment.