I have a jenkins job Job1 that sets a environment variable say CLIENT_CODE. I would like to use this variable value in a different jenkins job Job2, and i like to fetch this variable data from the last successful build of Job1.
Setting the variable is done from a shell command in Job1. And Job2 also uses shell commands to fetch this variable value.
Please let me know an approach to do this.