I need to migrate the freestyle project to the Jenkins pipeline. Any idea how to implement environment variable injection with groovy script to declarative pipeline?
I need pipeline code for this:
I need to migrate the freestyle project to the Jenkins pipeline. Any idea how to implement environment variable injection with groovy script to declarative pipeline?
I need pipeline code for this:
you can try add your groovy script into environment
environment {
if() {
env.xxx=yyy // xxx is the name of environment variable
}
}