Setting Cached Agent Environment Variable During Run

Everything appears to be working fine in your log. BuildVersion is set to R5 at 19:02:40 and BuildVersion is logged as R5 at 19:17:47. ContinuaCI.AgentProperty.Env.BuildVersion - a environment variable which is set when the FinalBuilder action starts remains unchanged.

I still don’t get what you are trying to do.

Are you trying to change a Continua CI agent property from a FinalBuilder script? If so why?

Are you trying to persist environment variables after the FinalBuilder action has been run for use by another Continua action, or another Continua build?

Agent properties are mainly for use on the server for deciding which agent to run builds on. A copy of all agent properties is transferred from the server to the agent at the start of the stage. These are available for reference by stage actions but cannot be updated by them.

A copy of all current user and machine environment variables is taken at the start of each stage and these are added to each Continua action process via Process.StartInfo.EnvironmentVariables.

We do not pick up any changes to environment variables between Continua actions. We recommend using build variables to pass values between actions.

If you let us know how you want things to work, we’ll see whether that is possible.