You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sd...@apache.org on 2022/10/28 12:07:56 UTC

[ignite-3] branch main updated: IGNITE-17965: Enable remote build cache for Gradle build on CI. (#1271)

This is an automated email from the ASF dual-hosted git repository.

sdanilov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 8989c33759 IGNITE-17965: Enable remote build cache for Gradle build on CI. (#1271)
8989c33759 is described below

commit 8989c337598b1c07416d84de5bf16e947c47a95f
Author: Mikhail <Po...@users.noreply.github.com>
AuthorDate: Fri Oct 28 16:07:51 2022 +0400

    IGNITE-17965: Enable remote build cache for Gradle build on CI. (#1271)
---
 gradle.properties |  1 +
 settings.gradle   | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/gradle.properties b/gradle.properties
index 36a7674150..95fc85f744 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -17,3 +17,4 @@
 org.gradle.configureondemand=true
 org.gradle.daemon=true
 org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
+org.gradle.caching=true
diff --git a/settings.gradle b/settings.gradle
index a718d1ac64..5d722e1a26 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -113,3 +113,22 @@ project(":ignite-replicator").projectDir = file('modules/replicator')
 project(":packaging-cli").projectDir = file('packaging/cli')
 project(":packaging-db").projectDir = file('packaging/db')
 project(":packaging").projectDir = file('packaging')
+
+ext.isCiServer = System.getenv().containsKey("IGNITE_CI")
+
+buildCache {
+    local {
+        enabled = !isCiServer
+        push = !isCiServer
+    }
+    remote(HttpBuildCache) {
+        enabled = isCiServer
+        push = isCiServer
+        url = System.getenv()["GRADLE_BUILD_CACHE_URI"] + "/cache/"
+        allowInsecureProtocol = true
+        credentials {
+            username = System.getenv()["GRADLE_BUILD_CACHE_USERNAME"]
+            password = System.getenv()["GRADLE_BUILD_CACHE_PASSWORD"]
+        }
+    }
+}