Specify SHA when "Preparing working directory" when running plugin

I want the “Preparing working directory” to checkout a particular commit so that a specific version of a file is available when the relevant plugin runs. Is there a way to do so? I’ve tried adding BUILDKITE_COMMIT but it doesn’t appear to override the original value. Thanks!

Hey @saj!

Not sure I quite get your use case :thinking:. You have a particular file version that you need to use in a plugin, is that right? If you have something (a file in this case) that shouldn’t change between runs, then using an artifact it’s the best option.
As you mentioned, you can’t override BUILDKITE_COMMIT.

Best!

Hi Paula,

To expand a bit more, the pipeline in question is setting up two instances to perform an automated analysis. The plugin we’re using currently references a local configuration file, but this file needs to match the version being deployed. I was hoping there was a way to override the branch that the “prepare working directory” step checks out to resolve my particular issue. I think I’ll try to checkout the branch prior to calling the plugin instead and skip the checkout as mentioned here.