[8.x](backport #4328) Allow use of version qualifier for staging artifacts #4331
+54
−38
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.
What is the problem this PR solves?
This commits adds support for an optional $VERSION_QUALIFIER env var/build option in the packaging pipeline to allow building prerelease artifacts from staging.
How does this PR solve the problem?
DRA_BRANCH
env var and skip snapshot builds when VERSION_QUALIFIER is presentHow to test this PR locally
Using this PR and the pipeline https://buildkite.com/elastic/fleet-server-package-mbp with
pull/4328/merge
and options:results in a successful 9.0.0-alpha1 artifacts, example: https://buildkite.com/elastic/fleet-server-package-mbp/builds/1526
Also a test without VERSION_QUALIFIER https://buildkite.com/elastic/fleet-server-package-mbp/builds/1525 produces the expected artifacts (note that when branch is main, i.e. not when testing using this PR, and there is no version qualifier defined, the staging dra publish is skipped, per design).
Related issues
Closes:
This is an automatic backport of pull request #4328 done by [Mergify](https://mergify.com).