-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow undefined variables in facts templates #307
Comments
Share the stacktrace to handle undefined value |
Here's an example:
This is the fact: As you can see |
I'd suggest to make this variable defined anyway. If this hasn't been defined yet by the step then make sure this is defined other way before evaluation is started |
That was my first reaction, but it's not working with my setup (for whatever reason).
If I don't define I understand handling env variables correctly is not this plugin's domain, but I'd get more consistent Teams notifications if it was robust with regards to undefined variables. |
What feature do you want to see added?
Currently, the connector crashes if any fact has a template with a variable that is undefined when the connector runs. It would be nice if templates could handle undefined variables instead: simply replacing it with an empty
""
string should be enough.My jobs have a mildly complicated set of actions, some of which dynamically set variables; some of the steps that do this may not run if some conditions are met, which means when that happens I don't get a Teams notification because the connector crashes. I could set all the variables initially and then simply change their value, but Jenkins tends to behave erratically when doing this.
Upstream changes
No response
The text was updated successfully, but these errors were encountered: