From 62e1492b1fb701e9078d0374286e1a7794df3c24 Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Mon, 21 Oct 2019 17:09:12 +0300 Subject: [PATCH] Don't build packages on non Linux (#48246) * Don't build packages on non Linux Closes #47007 * Explicitly exclude windows only --- .ci/os.ps1 | 6 +----- distribution/packages/build.gradle | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci/os.ps1 b/.ci/os.ps1 index 028bb460a71d6..7ec09daceed7e 100644 --- a/.ci/os.ps1 +++ b/.ci/os.ps1 @@ -27,10 +27,6 @@ New-Item -ItemType directory -Path \tmp $ErrorActionPreference="Continue" # TODO: remove the task exclusions once dependencies are set correctly and these don't run for Windows or buldiung the deb on windows is fixed -& .\gradlew.bat -g "C:\Users\$env:username\.gradle" --parallel --scan --console=plain destructiveDistroTest ` - -x :distribution:packages:buildOssDeb ` - -x :distribution:packages:buildDeb ` - -x :distribution:packages:buildOssRpm ` - -x :distribution:packages:buildRpm ` +& .\gradlew.bat -g "C:\Users\$env:username\.gradle" --parallel --scan --console=plain destructiveDistroTest exit $LastExitCode diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index a1ab72890a43c..25c50c0fa7392 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -19,6 +19,7 @@ import org.elasticsearch.gradle.LoggedExec import org.elasticsearch.gradle.MavenFilteringHack import org.redline_rpm.header.Flags +import org.elasticsearch.gradle.OS import java.nio.file.Files import java.nio.file.Path @@ -105,6 +106,9 @@ addProcessFilesTask('rpm', false, false) // is the same Closure commonPackageConfig(String type, boolean oss, boolean jdk) { return { + onlyIf { + OS.current().equals(OS.WINDOWS) == false + } dependsOn "process${oss ? 'Oss' : ''}${jdk ? '' : 'NoJdk'}${type.capitalize()}Files" packageName "elasticsearch${oss ? '-oss' : ''}" arch (type == 'deb' ? 'amd64' : 'X86_64')