Environments - Variables
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.
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
1 Posted by Ilya Finkelshte... on Jan 29, 2018 @ 09:28 PM
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 Posted by kneufeld on Jan 29, 2018 @ 09:40 PM
Is Environment Name available? I could hard code it but it would be better to get from a variable.
3 Posted by Ilya Finkelshte... on Jan 29, 2018 @ 09:55 PM
Do you always deploy from the build or also using Environments UI and API?
4 Posted by kneufeld on Jan 29, 2018 @ 09:56 PM
using the Environments for now.
5 Posted by Ilya Finkelshte... on Jan 29, 2018 @ 10:02 PM
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.
kneufeld closed this discussion on Mar 08, 2018 @ 06:43 PM.