Skip to content

Commit

Permalink
feat(build): use remote gradle cache (datahub-project#12344)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Jan 15, 2025
1 parent 94b9da0 commit b252f78
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,20 @@ include ':metadata-service:openapi-servlet:models'
include ':metadata-integration:java:datahub-schematron:lib'
include ':metadata-integration:java:datahub-schematron:cli'

buildCache {
def depotSecret = System.getenv('DEPOT_TOKEN');

remote(HttpBuildCache) {
url = 'https://cache.depot.dev'
enabled = depotSecret != null
push = true
credentials {
username = ''
password = depotSecret
}
}
}

def installPreCommitHooks() {
def preCommitInstalled = false
try {
Expand Down Expand Up @@ -116,7 +130,7 @@ def installPreCommitHooks() {
def stderr = new StringBuilder()
installHooksProcess.waitForProcessOutput(stdout, stderr)
if (installHooksProcess.exitValue() != 0) {
println "Failed to install hooks: ${stderr}"
println "Failed to install hooks: ${stdout}"
return
}
println "Hooks output: ${stdout}"
Expand Down

0 comments on commit b252f78

Please sign in to comment.