Here is the structure of my pipeline:
def call(String microservice_param) {
pipeline {
environment {
MICROSERVICE_NAME = "${microservice_param}".split("-")[1]
}
}
I would like to manipulate the string parameter as shown above but I get this error:
Environment variable values can only be joined together with ‘+’s.
Is there a way to do this?