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 use of version qualifier for staging artifacts #4328

Merged
merged 7 commits into from
Jan 17, 2025

Conversation

pchila
Copy link
Member

@pchila pchila commented Jan 16, 2025

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?

  • Support VERSION_QUALIFIER optional env var for prerelease builds
  • Refactor packaging pipeline to allow staging builds from main (that indirectly allow testing this PR too with the additional DRA_BRANCH env var and skip snapshot builds when VERSION_QUALIFIER is present
  • Remove unused VERSION and INFRA_REPO variables.

How 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:

DRA_BRANCH="main"
VERSION_QUALIFIER="alpha1"

results in a successful 9.0.0-alpha1 artifacts, example: https://buildkite.com/elastic/fleet-server-package-mbp/builds/1526

image

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:

@pchila pchila added Team:Elastic-Agent Label for the Agent team cleanup Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Jan 16, 2025
@pchila pchila self-assigned this Jan 16, 2025
@pchila pchila requested a review from a team as a code owner January 16, 2025 10:03
Copy link
Contributor

mergify bot commented Jan 16, 2025

This pull request does not have a backport label. Could you fix it @pchila? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Contributor

mergify bot commented Jan 16, 2025

backport-8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Jan 16, 2025
@dliappis dliappis force-pushed the cleanup-package-script branch from 41c5424 to 48f3c4e Compare January 16, 2025 13:06
@dliappis dliappis force-pushed the cleanup-package-script branch from 48f3c4e to 4db0d39 Compare January 16, 2025 13:09
@dliappis dliappis force-pushed the cleanup-package-script branch from 3d524b4 to a05e7c2 Compare January 16, 2025 13:35
@dliappis dliappis force-pushed the cleanup-package-script branch from a05e7c2 to e0545a3 Compare January 16, 2025 13:37
@dliappis dliappis changed the title Remove unused variables from buildkite package script Allow use of version qualifier for staging artifacts Jan 16, 2025
Copy link
Contributor

@michalpristas michalpristas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more comments with reasoning in .buildkite/pipeline.package.mbp.yml would be nice

@dliappis dliappis force-pushed the cleanup-package-script branch 3 times, most recently from ea7b973 to e5ac727 Compare January 17, 2025 10:46
@dliappis dliappis force-pushed the cleanup-package-script branch from e5ac727 to a6f9934 Compare January 17, 2025 10:52
@dliappis
Copy link
Contributor

dliappis commented Jan 17, 2025

more comments with reasoning in .buildkite/pipeline.package.mbp.yml would be nice

Thanks, added a few comments in 6a3dd69, I hope they help clarify a little (also updated the PR description)

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dliappis dliappis merged commit 29c1d88 into elastic:main Jan 17, 2025
8 checks passed
mergify bot pushed a commit that referenced this pull request Jan 17, 2025
This commits adds support for an optional $VERSION_QUALIFIER env var/build option in the packaging pipeline to allow building prerelease artifacts from staging.

Closes:

- #4325
- https://github.com/elastic/ingest-dev/issues/4859

---------

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
(cherry picked from commit 29c1d88)
@pchila pchila linked an issue Jan 17, 2025 that may be closed by this pull request
@pchila pchila added backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify labels Jan 17, 2025
mergify bot pushed a commit that referenced this pull request Jan 17, 2025
This commits adds support for an optional $VERSION_QUALIFIER env var/build option in the packaging pipeline to allow building prerelease artifacts from staging.

Closes:

- #4325
- https://github.com/elastic/ingest-dev/issues/4859

---------

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
(cherry picked from commit 29c1d88)
mergify bot pushed a commit that referenced this pull request Jan 17, 2025
This commits adds support for an optional $VERSION_QUALIFIER env var/build option in the packaging pipeline to allow building prerelease artifacts from staging.

Closes:

- #4325
- https://github.com/elastic/ingest-dev/issues/4859

---------

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
(cherry picked from commit 29c1d88)
pchila added a commit that referenced this pull request Jan 17, 2025
This commits adds support for an optional $VERSION_QUALIFIER env var/build option in the packaging pipeline to allow building prerelease artifacts from staging.

Closes:

- #4325
- https://github.com/elastic/ingest-dev/issues/4859

---------

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
(cherry picked from commit 29c1d88)

Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
dliappis added a commit to dliappis/fleet-server that referenced this pull request Jan 17, 2025
This commit is a follow-up to elastic#4328 and fixes a bug for main where staging main
artifacts will be products for every merge commit, thus overriding manual builds
using VERSION_QUALIFIER.
pchila added a commit that referenced this pull request Jan 17, 2025
This commits adds support for an optional $VERSION_QUALIFIER env var/build option in the packaging pipeline to allow building prerelease artifacts from staging.

Closes:

- #4325
- https://github.com/elastic/ingest-dev/issues/4859

---------

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
(cherry picked from commit 29c1d88)

Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
pchila added a commit that referenced this pull request Jan 17, 2025
This commits adds support for an optional $VERSION_QUALIFIER env var/build option in the packaging pipeline to allow building prerelease artifacts from staging.

Closes:

- #4325
- https://github.com/elastic/ingest-dev/issues/4859

---------

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
(cherry picked from commit 29c1d88)

Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
dliappis added a commit to dliappis/fleet-server that referenced this pull request Jan 17, 2025
This commit fixes a bug in elastic#4328 running snapshot instead of staging
for x86-64 and also ensures staging on main can be build when
 VERSION_QUALIFIER is set.
dliappis added a commit that referenced this pull request Jan 17, 2025
This commit fixes a bug in #4328 running snapshot instead of staging
for x86-64 and also ensures staging on main can be build when
 VERSION_QUALIFIER is set.
mergify bot pushed a commit that referenced this pull request Jan 17, 2025
This commit fixes a bug in #4328 running snapshot instead of staging
for x86-64 and also ensures staging on main can be build when
 VERSION_QUALIFIER is set.

(cherry picked from commit 8899271)
mergify bot pushed a commit that referenced this pull request Jan 17, 2025
This commit fixes a bug in #4328 running snapshot instead of staging
for x86-64 and also ensures staging on main can be build when
 VERSION_QUALIFIER is set.

(cherry picked from commit 8899271)
mergify bot pushed a commit that referenced this pull request Jan 17, 2025
This commit fixes a bug in #4328 running snapshot instead of staging
for x86-64 and also ensures staging on main can be build when
 VERSION_QUALIFIER is set.

(cherry picked from commit 8899271)
dliappis added a commit that referenced this pull request Jan 17, 2025
This commit fixes a bug in #4328 running snapshot instead of staging
for x86-64 and also ensures staging on main can be build when
 VERSION_QUALIFIER is set.

(cherry picked from commit 8899271)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
dliappis added a commit that referenced this pull request Jan 17, 2025
This commit fixes a bug in #4328 running snapshot instead of staging
for x86-64 and also ensures staging on main can be build when
 VERSION_QUALIFIER is set.

(cherry picked from commit 8899271)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
dliappis added a commit that referenced this pull request Jan 17, 2025
This commit fixes a bug in #4328 running snapshot instead of staging
for x86-64 and also ensures staging on main can be build when
 VERSION_QUALIFIER is set.

(cherry picked from commit 8899271)

Co-authored-by: Dimitrios Liappis <dimitrios.liappis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify backport-8.16 Automated backport with mergify backport-8.17 Automated backport with mergify cleanup Team:Elastic-Agent Label for the Agent team Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fleet-server] Check support for prerelease qualifiers
5 participants