it has never worked using token macro I am injecting the variable using the EnvInject plugin to create the environment variable as seen here: 18:36:56 [EnvInject] - Loading node environment variables. 18:36:56 [EnvInject] - Preparing an environment for the build. 18:36:56 [EnvInject] - Keeping Jenkins system variables. 18:36:56 [EnvInject] - Keeping Jenkins build variables. 18:36:56 [EnvInject] - Executing and processing the following script content: 18:36:56 echo $ {branch} 18:36:56 FOO=`git ls-remote ssh://git@stash:7999/techops/puppet.git origin ${branch} | cut -f1` 18:36:56 18:36:56 18:36:56 [/tmp] $ /bin/sh -xe /tmp/hudson4110050367620133632.sh 18:36:56 + echo feature-jenkins-slave-swarm-qax 18:36:56 feature-jenkins-slave-swarm-qax 18:36:56 ++ git ls-remote ssh://git@stash:7999/techops/puppet.git origin feature-jenkins-slave-swarm-qax 18:36:56 ++ cut -f1 18:36:56 + FOO=a75e94c868219fdbcd2acab968d8f4a02a3dac7c 18:36:56 [EnvInject] - Script executed successfully. 18:36:56 [EnvInject] - Injecting contributions. As I can surmise here, my variable is being populated via EnvInject, I can printenv and see FOO with the correct sha. When using the above suggestion I am definitely passing something different to the notifer as i get a 405 response from the stash server. |