Environments - Variables

kneufeld's Avatar

kneufeld

29 Jan, 2018 08:46 PM

What additional variables are there when a deployment to an Environment is triggered?
Is there a list?

I am wondering what I can use for custom notification messages.

  1. 1 Posted by Ilya Finkelshte... on 29 Jan, 2018 09:28 PM

    Ilya Finkelshteyn's Avatar

    Environment variables available during the build are not available during Environment deployment. However any data from webhook payload is available for notification. You can create custom notification message template as described here, using data from webhook template. You can use it with any other notification provider, not only webhook notification provider. Please note that for notifications from Environment deployments, you have to prefix variables with build, e.g. build.commitAuthor.

    If this does not help, please let us know more details.

  2. 2 Posted by kneufeld on 29 Jan, 2018 09:40 PM

    kneufeld's Avatar

    Is Environment Name available? I could hard code it but it would be better to get from a variable.

  3. 3 Posted by Ilya Finkelshte... on 29 Jan, 2018 09:55 PM

    Ilya Finkelshteyn's Avatar

    Do you always deploy from the build or also using Environments UI and API?

  4. 4 Posted by kneufeld on 29 Jan, 2018 09:56 PM

    kneufeld's Avatar

    using the Environments for now.

  5. 5 Posted by Ilya Finkelshte... on 29 Jan, 2018 10:02 PM

    Ilya Finkelshteyn's Avatar

    Then I do not see the way to do this other than hard-coding it in your custom notification template. As long as notification settings are not being shared between environments, I do not think that it is very bad to hard-code it...

    Just FYI, if notification is connected to the build, you could use this trick to add custom value.

    Update: You also can use deployment project instead of environments but this is probably too much work if it only solves the problem we are discussing.

  6. kneufeld closed this discussion on 08 Mar, 2018 06:43 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac