Can I refer environment variable in name of the archive

I would like name of the archive created by the build to depend on environment variable that will be set before by one of build steps (Custom Script).
Whether or not it will work depends on when TC resolves environment variables. If it resolves them immediately in start, that will obviously not work.
However if it resolves them before using, it will work.

Or probably there is a better way to achieve what I want?

Comment actions Permalink

Hi Ilya,

TeamCity resolves parameters in the artifacts path before publishing the artifacts. So you can use TeamCity parameters in the artifact path and define these parameters in the build script.

Comment actions Permalink

Hi Alina,

What about other paramters?

E.g. if parameter's value is set to %env.MY_ENV_VAR%, when will it be resolved?

Are there other options to modify parameters from build steps? Ultimately I want parameters set during a build to be reset after build finishes (or fails).


Please sign in to leave a comment.