-
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
Conversation
This commit adds classifiers to the distributions indicating the OS (for archives) and platform. The current OSes are for windows, darwin (ie macos) and linux. This change will allow future OS/architecture specific changes to the distributions. Note the docs using distribution links have been updated, but will be reworked in a followup to make OS specific instructions for the archives.
Pinging @elastic/es-core-infra |
@elasticmachine test this please |
@elasticmachine run elasticsearch-ci/1 |
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.
Looks good. Just one request on not abbreviating some variable names; no need for another round.
distribution/bwc/build.gradle
Outdated
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Index
instead of Ndx
please?
distribution/bwc/build.gradle
Outdated
String classifier = "" | ||
String extension = projectName | ||
if (bwcVersion.onOrAfter('7.0.0') && (projectName.contains('zip') || projectName.contains('tar'))) { | ||
int ndx = projectName.indexOf('-') |
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. 🙏
distribution/bwc/build.gradle
Outdated
int archNdx = artifactFileName.indexOf('x86_64') | ||
String classifier = '' | ||
if (archNdx != -1) { | ||
int osNdx = artifactFileName.lastIndexOf('-', archNdx - 2) |
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
instead of Ndx
.
@elasticmachine run elasticsearch-ci/1 |
@elasticmachine run elasticsearch-ci/1 |
2 similar comments
@elasticmachine run elasticsearch-ci/1 |
@elasticmachine run elasticsearch-ci/1 |
@elasticmachine run elasticsearch-ci/1 |
1 similar comment
@elasticmachine run elasticsearch-ci/1 |
The distribution now includes a platform specific classifier that the docker build wasn't taking into account. Relates: #37881
This commit adds classifiers to the distributions indicating the
OS (for archives) and platform. The current OSes are for windows, darwin (ie
macos) and linux. This change will allow future OS/architecture specific
changes to the distributions. Note the docs using distribution links
have been updated, but will be reworked in a followup to make OS
specific instructions for the archives.