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

[CHORE] Refactor Buildkite scripts for better reusability #7358

Merged
merged 10 commits into from
Nov 15, 2023
Merged

[CHORE] Refactor Buildkite scripts for better reusability #7358

merged 10 commits into from
Nov 15, 2023

Conversation

1Copenut
Copy link
Contributor

Summary

Ops informed me of some improvements I could make while preparing to split our Dockerfile for caching in Buildkite. I took those recommendations and split them into this chore PR. Put simply, this PR moves scripts around, factors our retry function out to a common helper, and removes old Jenkins CI scripts.

QA

QA will be done on Buildkite CI. We will know this work was successful if PR jobs for test and deploy docs run successfully.

@1Copenut 1Copenut marked this pull request as ready for review November 13, 2023 18:49
@1Copenut 1Copenut requested a review from a team as a code owner November 13, 2023 18:49
@cee-chen
Copy link
Contributor

I left a few basic comments/questions - reviewing by commit helped a lot! While at a glance the cleanup felt good to me, I don't feel like I have a good enough grasp of buildkite/bash or best practices to fully review this. @tkajtoch, could you take a look here? Or alternatively, Trevor, could we loop in Ops to help review this PR?

@1Copenut
Copy link
Contributor Author

Or alternatively, Trevor, could we loop in Ops to help review this PR?

I plan to ping the Ops team as additional reviewers on the next iteration. I'll actually be passing credentials so I can log into Docker via CI to build and push an image. I feel confident with this refactor being correct given yours and Tomasz's votes of confidence.

I saw an opportunity to position us for future growth through code reorganization, and learned some best practices that helped a few other folks too.

@cee-chen
Copy link
Contributor

Ahh gotcha! If there's another PR coming after this, I'm good with rubberstamping/merging it in to unblock you. LMK if that's what you'd prefer!

@@ -0,0 +1,7 @@
#!/bin/bash

Copy link
Member

Choose a reason for hiding this comment

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

[Not a blocking request]
Could you add a comment explaining this script is automatically executed by the agent and link the docs https://buildkite.com/docs/agent/v3/hooks here and in the pre-command script?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes absolutely. I actually had a test failing because main merge didn't update a script location. I'll add the information requested and fix that break. Will merge when tests are green again.

Copy link
Contributor

@cee-chen cee-chen Nov 15, 2023

Choose a reason for hiding this comment

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

a README inside hooks/ instead of a comment would also be valid (just IMO!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh dang, that is a great idea. I'll grab that and add it to the next PR!

Copy link
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

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

Code changes look good to me! :shipit:

@kibanamachine
Copy link

Preview staging links for this PR:

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @1Copenut

@1Copenut 1Copenut merged commit a744f40 into elastic:main Nov 15, 2023
@1Copenut 1Copenut deleted the chore/buildkite-shell-refactoring branch November 15, 2023 19:06
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