szabgab / code-maven.com

The content of the Code-Maven site
https://code-maven.com/
30 stars 54 forks source link

What is the scope of data variable in this? #157

Closed kushsharma1001 closed 2 years ago

kushsharma1001 commented 2 years ago
szabgab commented 2 years ago

If you refer to this article: https://code-maven.com/jenkins-readfile-writefile then the variables defined using def are scoped to the enclosing block.

I think you can create variables without the def keyword and then they might be used in other stages as well, however I think they need to be serializable.