瀏覽代碼

QA: Fix resolution of default distribution (#31351)

If you run `./gradlew -p qa bwcTest -Dtests.distribution=zip` then we
need to resolve older versions of the default distribution. Since those
aren't available in maven central, we need add the elastic maven repo to
the project.
Nik Everett 7 年之前
父節點
當前提交
d6d0727aac
共有 1 個文件被更改,包括 14 次插入0 次删除
  1. 14 0
      qa/build.gradle

+ 14 - 0
qa/build.gradle

@@ -5,6 +5,20 @@ subprojects { Project subproj ->
   subproj.tasks.withType(RestIntegTestTask) {
   subproj.tasks.withType(RestIntegTestTask) {
     subproj.extensions.configure("${it.name}Cluster") { cluster ->
     subproj.extensions.configure("${it.name}Cluster") { cluster ->
       cluster.distribution = System.getProperty('tests.distribution', 'oss-zip')
       cluster.distribution = System.getProperty('tests.distribution', 'oss-zip')
+      if (cluster.distribution == 'zip') {
+        /*
+         * Add Elastic's repositories so we can resolve older versions of the
+         * default distribution. Those aren't in maven central.
+         */
+        repositories {
+          maven {
+            url "https://artifacts.elastic.co/maven"
+          }
+          maven {
+            url "https://snapshots.elastic.co/maven"
+          }
+        }
+      }
     }
     }
   }
   }
 }
 }