Can we have script block or credential block to perform some logic inside the environment stage in Jenkinsfile?
When I tried, it kept throwing errors saying only variable=value kind of expressions are allowed inside the environment stage.I want to read a Yaml file inside the environment stage since it is at the very beginning, to get some variable values. Please help.
Thanks a lot Yves. I also saw this in some samples. But, I have a Shared Library step, written to read a Yaml file from URL and return a Yaml Object. However, it is not returning the Yaml object when I call the step, although it is not throwing any error.