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

build: add prerelease resource #7438

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

tkajtoch
Copy link
Member

Summary

This PR adds a new Backstage resource to handle the automatic EUI (pre)release process on merges to main and a placeholder Buildkite pipeline setup so that it can be tested safely using the build/test-automatic-releases branch.

QA

  • Validate the catalog-info.yaml syntax using the Backstage config validator (ask @tkajtoch for a link to the internal tool if needed)

Additional QA will be done manually by @tkajtoch after merging this PR to main and letting the changes propagate to Backstage and Buildkite.

@tkajtoch tkajtoch self-assigned this Dec 27, 2023
@tkajtoch tkajtoch requested a review from a team as a code owner December 27, 2023 20:24
---
##
# Example pipeline
# TODO: Remove this resource and related pipeline if they're not needed anymore
Copy link
Contributor

Choose a reason for hiding this comment

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

is this TODO meant to be resolved in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Check with Ops on the Buildkite channel if you're going to remove this Buildkite job. I think it should be fine, but also remember them asking folks to tread lightly if removing example jobs. Should be fine now, but passing along what I learned on the way in case it's still relevant.

build_pull_requests: false
filter_enabled: true
# TODO: remove the test-automatic-releases condition when the pipeline is production-ready
filter_condition: build.branch == "main" || build.branch == "build/test-automatic-releases"
Copy link
Contributor

@cee-chen cee-chen Jan 2, 2024

Choose a reason for hiding this comment

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

If we're still testing, shouldn't we be merging this PR into this test branch instead of to main? or am I misunderstanding the purpose of this PR?

Copy link
Contributor

@1Copenut 1Copenut Jan 2, 2024

Choose a reason for hiding this comment

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

Any changes to catalog-info.yml have to be in main to be picked up. There's a task that looks for new changes periodically and only looks at that one branch. I had to find that out the hard way. 😬

Once this config change is in main, then Tomasz should be able to kick off the downstream Buildkite job on the build/test-automatic-releases branch.

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh right, I always forget that.

Shouldn't this line omit the build.branch for now in that case, to prevent it from running on main itself?

Suggested change
filter_condition: build.branch == "main" || build.branch == "build/test-automatic-releases"
filter_condition: build.branch == "build/test-automatic-releases"

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think it sh|could ignore main. That way it only runs against the test branch for now, and when it's ready, the catalog-info be updated to point at main and test for real.

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly, I kinda wanna yolo it and keep running the pipeline on main since it should work just fine. Worst case scenario we revert and delete the resource manually if it doesn't get deleted automatically. I added the test branch to the condition so I can experiment with the pipeline script there without having to merge things to main

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha, as long as we're consciously making the decision to yolo (and respond promptly in case anything goes awry)! None of my comments are blocking, so feel free to address them or merge as you see fit

Copy link
Contributor

@1Copenut 1Copenut left a comment

Choose a reason for hiding this comment

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

I don't see anything that needs changed here to scaffold the first job. I left two comments as responses to Cee's questions that are germane to getting the Buildkite job built and tearing down the example build.

This is arguably the most difficult part of the process, updating the catlaog-info.yml file to configure how the job should run. It has to be in main to pick up changes, then you can work against the feature branch after.

@@ -0,0 +1,7 @@
steps:
- command: "echo 'This pipeline is currently a no-op'"
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Excellent call on the echo command to verify job runs when you think it's supposed to. The Buildkite Block Step might be of interest if you want to initiate the job via human interaction when you're ready to build this out.

@tkajtoch tkajtoch force-pushed the build/add-prerelease-resource branch from cf11ecc to 3753f57 Compare January 3, 2024 21:06
@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @tkajtoch

@tkajtoch tkajtoch merged commit e310d71 into elastic:main Jan 3, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants