I am trying to create a new variable using the name of old variable (appending old variable with some string) and assign that new variable with some value as in example below in jenkinsfile using groovy:
def var1= "value1"
def var1 + "_someval"= 50 // creating a new variable which will have name value1_someval and it will have value 50
print( "value for value1_someval is" + value1_someval)
// expected output is that new variable value1_someval is created with value 50 assigned to it.