Hello, IIUC your question then it's not really a Jenkins issue.
Spawned processes from Jenkins will inherit the values from environment
from when it started.

IMO you should/could consider changing that design to retrieve this counter
from somewhere Central (think a registry like zookeeper or consul, or even
a dbms table possibly).

In any case using this environment var principle is going to prove complex,
and even more when using Jenkins agents (where env is not the master's).

My 2 cents

Le 22 juin 2017 2:18 PM, <[email protected]> a écrit :

> I have an analysis number variable in my batch script that increments
> after every job build. I have to get this new value in my post build email
> notification. Jenkins job makes a copy of all system environment variables
> at the start up and this way I keep getting the same environment variable
> value in my post-build email, even though my analysis number environment
> variable stored in the system has incremented.
>
>
> My question is there a way to access the system environment variable and
> not its copy stored in Jenkins?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/0b01a537-7f38-44b3-b23f-15dbcde97130%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/0b01a537-7f38-44b3-b23f-15dbcde97130%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS5VTW8vkdujW5TxMLn7T6_y7iwxrF%2BAGFTJpsrJE9qB-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to