diff --git a/Jenkinsfile b/Jenkinsfile index 545c2527ac..203597e9f9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,8 +55,12 @@ pipeline { stage('Build') { steps { - // build without tests - gradle "-xtest build" + withCredentials([ + usernamePassword(credentialsId: 'scmm-gradle-build-cache', usernameVariable: 'GRADLE_BUILD_CACHE_USER', passwordVariable: 'GRADLE_BUILD_CACHE_PASSWORD') + ]) { + // build without tests + gradle "-xtest build" + } } } diff --git a/settings.gradle b/settings.gradle index f67acde01f..5015455ba5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -90,5 +90,9 @@ buildCache { useExpectContinue = true url = 'https://build-cache.scm-manager.org/cache/' push = true + credentials { + username = System.getenv('GRADLE_BUILD_CACHE_USER') + password = System.getenv('GRADLE_BUILD_CACHE_PASSWORD') + } } }