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?

2 comments
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.

0
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).

0

Please sign in to leave a comment.