Skip to content

Commit

Permalink
Don't build packages on non Linux (elastic#48246)
Browse files Browse the repository at this point in the history
* Don't build packages on non Linux

Closes elastic#47007

* Explicitly exclude windows only
  • Loading branch information
alpar-t committed Oct 21, 2019
1 parent 59d5d3e commit 62e1492
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .ci/os.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions distribution/packages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 62e1492

Please sign in to comment.