Browse Source

ci: Load dependencies as a separate gradle task

Updates blubber config to v3 and uses a builder command to load gradle
dependencies separately from running the tests.

Change-Id: I8c08412ec1b64fac16bbf7534e2df3bf74f4fe33
Dan Duvall 1 year ago
parent
commit
ef7d1e346e
2 changed files with 15 additions and 3 deletions
  1. 5
    3
      .pipeline/blubber.yaml
  2. 10
    0
      build.gradle

+ 5
- 3
.pipeline/blubber.yaml View File

@@ -1,8 +1,10 @@
1
-version: v2
2
-base: docker-registry.wikimedia.org/wikimedia-stretch
3
-apt: { packages: [gradle] }
1
+version: v3
2
+base: gradle:jre
4 3
 
5 4
 variants:
6 5
   test:
7 6
     runs: { insecurely: true }
7
+    builder:
8
+      command: [gradle, deps]
9
+      requirements: [build.gradle]
8 10
     entrypoint: [gradle, test]

+ 10
- 0
build.gradle View File

@@ -28,3 +28,13 @@ test {
28 28
     exceptionFormat = 'full'
29 29
   }
30 30
 }
31
+
32
+/**
33
+ * Build task used to preload all dependencies.
34
+ */
35
+task deps(type: Exec) {
36
+  // Simply reading testRuntime.files will cause gradle to resolve/install
37
+  // runtime and test dependencies
38
+  configurations.testRuntime.files
39
+  commandLine 'true'
40
+}

Loading…
Cancel
Save