I have a pipeline job with a jenkinsfile, as a result when the pipeline runs there is an scm object,
hudson.plugins.mercurial.MercurialSCM
I notice in the source code that there is
public void buildEnvVars(AbstractBuild<?,?> build, Map<String, String> env)
Which injects MERSURIAL_REVISION, MERCURIAL_REVISION_BRANCH etc.
Now a brief google gives me the impression that that method should be called automatically by AbstractBuild.
But if I do
sh "set"
none of those Mercurial environment are visible
So do I have to do something explicit in order to gain access to those values?
thanks
Jon