-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OS/architecture classifier to distributions #37881
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f91aad6
Add OS/architecture classifier to distributions
rjernst 82d55d0
fix alignment
rjernst 987ac08
fix more alignment
rjernst d489fa8
fix version qualifier for bwc filename format
rjernst 63c486f
fix docs test
rjernst 860e1cf
Merge branch 'master' into bundle_jdk3
rjernst d56725c
Merge branch 'master' into bundle_jdk3
rjernst 29c07d4
address review comments
rjernst 88f071b
Merge branch 'master' into bundle_jdk3
rjernst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// This file is intentionally blank. All configuration of the | ||
// distribution is done in the parent project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// This file is intentionally blank. All configuration of the | ||
// distribution is done in the parent project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,17 +122,34 @@ bwcVersions.forPreviousUnreleased { VersionCollection.UnreleasedVersionInfo unre | |
|
||
Map<String, File> artifactFiles = [:] | ||
List<String> projectDirs = [] | ||
List<String> projects = ['zip', 'deb', 'rpm'] | ||
List<String> projects = ['deb', 'rpm'] | ||
if (bwcVersion.onOrAfter('7.0.0')) { | ||
projects.addAll(['windows-zip', 'darwin-tar', 'linux-tar']) | ||
} else { | ||
projects.add('zip') | ||
} | ||
|
||
for (String projectName : projects) { | ||
String baseDir = "distribution" | ||
String classifier = "" | ||
String extension = projectName | ||
if (bwcVersion.onOrAfter('7.0.0') && (projectName.contains('zip') || projectName.contains('tar'))) { | ||
int ndx = projectName.indexOf('-') | ||
classifier = "-${projectName.substring(0, ndx)}-x86_64" | ||
extension = projectName.substring(ndx + 1) | ||
if (extension.equals('tar')) { | ||
extension += '.gz' | ||
} | ||
} | ||
if (bwcVersion.onOrAfter('6.3.0')) { | ||
baseDir += projectName == 'zip' ? '/archives' : '/packages' | ||
baseDir += projectName.endsWith('zip') || projectName.endsWith('tar') ? '/archives' : '/packages' | ||
// add oss variant first | ||
projectDirs.add("${baseDir}/oss-${projectName}") | ||
artifactFiles.put("oss-" + projectName, file("${checkoutDir}/${baseDir}/oss-${projectName}/build/distributions/elasticsearch-oss-${bwcVersion}-SNAPSHOT.${projectName}")) | ||
artifactFiles.put("oss-" + projectName, file("${checkoutDir}/${baseDir}/oss-${projectName}/build/distributions/elasticsearch-oss-${bwcVersion}-SNAPSHOT${classifier}.${extension}")) | ||
} | ||
projectDirs.add("${baseDir}/${projectName}") | ||
artifactFiles.put(projectName, file("${checkoutDir}/${baseDir}/${projectName}/build/distributions/elasticsearch-${bwcVersion}-SNAPSHOT.${projectName}")) | ||
artifactFiles.put(projectName, | ||
file("${checkoutDir}/${baseDir}/${projectName}/build/distributions/elasticsearch-${bwcVersion}-SNAPSHOT${classifier}.${extension}")) | ||
} | ||
|
||
Closure createRunBwcGradleTask = { name, extraConfig -> | ||
|
@@ -216,9 +233,15 @@ bwcVersions.forPreviousUnreleased { VersionCollection.UnreleasedVersionInfo unre | |
String artifactFileName = artifactFile.name | ||
String artifactName = artifactFileName.contains('oss') ? 'elasticsearch-oss' : 'elasticsearch' | ||
String suffix = artifactFile.toString()[-3..-1] | ||
int archNdx = artifactFileName.indexOf('x86_64') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe |
||
String classifier = '' | ||
if (archNdx != -1) { | ||
int osNdx = artifactFileName.lastIndexOf('-', archNdx - 2) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
classifier = "${artifactFileName.substring(osNdx + 1, archNdx - 1)}-x86_64" | ||
} | ||
configurations.create(projectName) | ||
artifacts { | ||
it.add(projectName, [file: artifactFile, name: artifactName, type: suffix, builtBy: buildBwcVersion]) | ||
it.add(projectName, [file: artifactFile, name: artifactName, classifier: classifier, type: suffix, builtBy: buildBwcVersion]) | ||
} | ||
} | ||
// make sure no dependencies were added to assemble; we want it to be a no-op | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index
please. 🙏