how can I get the value of a global variable within a function in a pipeline?
I have a declarative pipeline with a few steps. at the end I send a message to slack with some statistics of the compilation times and some more information. I want to send in case it fails the stage at which it fails. I have set a global variable but the function does not seem to be able to read its value. This is a simplified version of what I have: