-
Notifications
You must be signed in to change notification settings - Fork 998
Add a build qualifier system property to the build #1215
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
Conversation
Allows build processes to pick up a qualifier to add into the version at build time instead of depending on it from a version file. By default, it will continue to use alpha1 as the qualifier until the ES build changes the master branch to ship an unqualified snapshot version during the 7 prerelease period.
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.
Executed the branch code, and all looks good. Just a couple questions ...
compile name: "build-tools-${version}" | ||
compile name: "build-tools-${esVersion}" | ||
} else { | ||
compile group: 'org.elasticsearch.gradle', name: 'build-tools', version: esVersion |
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.
This forces the qualified ES to exist in the remote repo prior to allowing this build to succeed... is that intentional ?
For example
./gradlew clean assemble -Dbuild.version_qualifier=alpha1 -Dbuild.snapshot=false
will not build until ES alpha1 (not snapshot) is available on the remote repo, in the prior version, it was controlled solely by the property which, (to me) is unclear if this is a change in the behavior/workflow for the release.
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.
Further up in the script the localRepo
variable is set from the system properties. The localRepo property is used to configure a local directory as a repository for resolving project dependencies. During the release process, Elasticsearch is built first and the resulting build tools artifact is copied to the localRepo directory in the ES-Hadoop project. This way ES-Hadoop can depend on the exact same artifact that will be released by the same build. Those setup steps and scripts are managed outside this script by the release automation.
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.
Thanks for the explains!
String esVersion = props.getProperty('elasticsearch') | ||
|
||
// TODO: This default should be removed when ES stops using alpha1 as its default qualifier | ||
String qualifier = System.getProperty("build.version_qualifier", "alpha1") |
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.
Does the release manager need to be aware of this system property ?
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.
There's a separate PR open for updating the release automation with the new qualifier code.
Also noticed a misnamed variable
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.
LGTM
Thanks @jakelandis! |
Allows build processes to pick up a qualifier to add into the version
at build time instead of depending on it from a version file. By
default, it will continue to use alpha1 as the qualifier until the ES
build changes the master branch to ship an unqualified snapshot version
during the 7 prerelease period.