Skip to content
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

Allow the build process to receive a version qualifier at compile time #8186

Closed
ph opened this issue Aug 31, 2018 · 5 comments · Fixed by #8310
Closed

Allow the build process to receive a version qualifier at compile time #8186

ph opened this issue Aug 31, 2018 · 5 comments · Fixed by #8310

Comments

@ph
Copy link
Contributor

ph commented Aug 31, 2018

Allow passing a build time qualifier so that a build artifact can be promoted to GA without requiring a rebuild. Our build process accepts the SNAPSHOT environment variable to add the snapshot suffix, and we need to add a VERSION_QUALIFIER options that will allow the release manager to specify the qualifier to be used.

The generated package will use the specified qualifier and the beats will also report their version using the qualifier used at built time.

@ph ph added the :Packaging label Aug 31, 2018
@ph ph changed the title Beat allow to pass build time version qualifier Allow the build process to receive a version qualifier at compile time Aug 31, 2018
@ph
Copy link
Contributor Author

ph commented Aug 31, 2018

Linked to APM elastic/apm-server#1348

@graphaelli
Copy link
Member

I'd like to request some feedback on elastic/apm-server#1348 (comment), all of the changes made were in vendored beats code.

tsg added a commit to tsg/beats that referenced this issue Sep 8, 2018
The VERSION_SPECIFIER env variable adds a custom text after the version.
Example run:

     VERSION_SPECIFIER=-rc1 mage -v package

Closes elastic#8186.
@tsg
Copy link
Contributor

tsg commented Sep 8, 2018

@graphaelli I saw your comment only after pushing this PR: #8271. That is the result of Andrew walking me through the changes that are needed.

Your PR seems to change the code version (e.g. changes in GetDefaultVersion), we've strictly altered the final package names, nothing in the contents of them.

@graphaelli
Copy link
Member

Right, I've tried to handle both the code version and package name. The tricky part was allowing each branch to set a default qualifier without requiring the build to provide one, or mage to know about the defaults - that is in 6.4.1 there is no qualifier by default, in 7.0.0 it's alpha1 unless otherwise specified.

@jasontedor
Copy link
Member

We will not need default qualifiers as in the future all of our 7.0.0 snapshot builds will be unqualified. Qualifiers will only be used when preparing pre-releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants