Override BUILDKITE_MESSAGE in hooks?

Hi,

Is it possible to customize BUILDKITE_MESSAGE by modifying it, perhaps in bootstrap or some other hook?

Thanks!

Hey @l4stewar! :wave:

BUILDKITE_MESSAGE gets overridden when we first get the git commit message during checkout (that’ll change it in the build, and therefore for future-uploaded jobs, but not for any already in flight)
You can always just change the env for the current job, within your command or hooks, to affect the current job only.
As a side note, BUILDKITE_MESSAGE has a max size

Best!

Thanks @paula -

You can always just change the env for the current job, within your command or hooks, to affect the current job only.

But doesnt BUILDKITE_MESSAGE determine the title of the build? What does it mean to say it only affects the current job? (What im trying to do is change the title of the build, for example to make it more descriptive.)

Thanks!

What im trying to do is change the title of the build, for example to make it more descriptive.

Right, that’s not possible :-/
You can have for example a job that sends a message to Slack and uses that env var; in that case, you should be able to update the value of the var, but only for that job.

Cheers!

Ok - thanks.