Define a stage variable, pass your environment variable to that stage variable. In subsequent steps you can refer the value of the stage variable.