New answers tagged

0 votes

How to define global variables in groovy file, which I want to load and consume?

Your example code has a typo: b = "second letter; is missing the closing quote. Even if you fix that typo your code still won't work. If you print the child variable it will be null? That is ...
user avatar
  • 759
0 votes

How to define global variables in groovy file, which I want to load and consume?

It just could be that: import groovy.transform.Field @Field public a = "first letter" @Field public b = "second letter" works (I got hint from https://stackoverflow.com/questions/...
user avatar
1 vote

Reuse block string without processing it on the fly

The withCredentials would be setting the environment variables for you so you wouldn't need to use export as they will already be passed into the shell. So you can pass in the remaining variables as ...
user avatar
1 vote
Accepted

Reuse block string without processing it on the fly

When you have a variable inside of a string that is called a gstring or groovy string. In Groovy, which is the language used inside of the script block, you have to use a certain style of quotes if ...
user avatar
  • 759

Top 50 recent answers are included