Setting the git rev-parse HEAD value as an environ...
# 🌱|help-and-getting-started
I've got 3 distinct repositories that make up my project as a whole. I want to have the ability to display the git hash on the dashboards for each of the 3 deployments, by running
git rev-parse HEAD
or equivalent and passing that on to the image being deployed. I'm not seeing a crystal clear path on doing that in just the
files, and wondering if anybody has a method of achieving that you wouldn't mind sharing.
@little-army-47606 You can use the template variable
${git.commitHash} Is this what you were looking for?
I tried setting an environment variable straight from this template variable and it doesn’t appear to work.
We've got one
file that builds out the required cluster specifications, and then 3 linked-repos that each have their own
file for Build and Deploy , specific to the requirements of each deployment's stack. We run the deploy action from the overall product directory, with each of the linked repos nested in
, each with their own individual commit hashes. It's those 3 commit hashes that I want to have environment variables for, each on their individual pods. So, for example,
has its own commit hash,
has its own commit hash, and
has its own...