I am currently working in an environment where we have a lot of different repos, each has their own buildkite pipeline and build scripts inside of the .buildkite folder in the root of the directory.
However a lot of these scripts are duplicated across the repos, and I feel like managing the scripts in each repo is going to cause us some issues in the future. An example of the types of scripts are things like selecting the Terraform workspace, ensuring that the right version of node is installed etc. these are the exact same code for each repo.
What is the best practice when it comes to having scripts shared across you buildkite pipelines, should I just pull each one from a shared repo?