Environment Variable for Deploy Hooks

I would like a System Environment Variable to know when a Deploy Hook has triggered a Deployment (for use in an Ignored Build Step script).

This is close to what I ultimately wanted but was closed prematurely "Deploy Hook Only" in "Ignored Build Step"

Hey @zachleatherman! If you want deployments only via Deploy Hook, you could disable Git deployments with git.deploymentEnabled. But I suspect you’ve got a more nuanced reason that you need a Deploy Hook flag for your Ignored Build Step script.

If you can describe the scenario a bit more, I’ll try to find an existing option that would work for you or open a ticket with the engineering team if we need something new added.

Howdy, I have a production environment and custom environment that both build from the main git branch. In addition to git deployments, I also want one of these to build via Deploy Hook and the other to not. I don’t want to have to manage multiple git branches to do this (though I might investigate Git - git-symbolic-ref Documentation as an alternative option).

Thanks for sharing that. I reached out to the engineering team for more ideas and I’ll let you know what I hear back from them.

Would you want it to be a simple boolean to indicate whether the deployment was trigger by a deploy hook? Or do you need to know the name of the deploy hook too?

1 Like

A boolean would be excellent and sufficient to solve my issue!

I don’t have specific timeline for the new environment variable, but the team confirmed they have a ticket to work on this once they’re freed up from current projects.