I have tried above , but it is not working .
Actual issue is below assignment is not working with system groovy script , it is returning null value.
def ARTIFACT_VERSION=currentBuild.getEnvironment()['POM_VERSION']; ====> POM_VERSIOM has values xxxx
def artifactVersionParam = new hudson.model.StringParameterValue("ARTIFACT_VERSION", ARTIFACT_VERSION)
def artifactVersionParamAction = new hudson.model.ParametersAction(artifactVersionParam);
currentBuild.addAction(artifactVersionParamAction);
println currentBuild.getEnvironment()['POM_VERSION']; =====> output : xxxx
println currentBuild.getEnvironment()['ARTIFACT_VERSION']; =====> output : null
Because of this such variables are not accessible in environment variables in shell. It is working as expected in jenkins 1.X version.