Variables usage in build configuration Follow
DEAR JetBrains developers and Teamcity experienced users,
There's not enought product documentation yet so, I need to ask you for the
usage of variables in the build configuration.
So, we have the server administration page, I'm setting a new build, plenty
of hope...
The questions are:
(1) What is the variable replacement syntax? $ %var% $var ...
Could you tell me?
(2) Is it platform-dependant? Shall we use the same syntax on a linux and a
windows machine?
(3) what variables are predefined in the agent, which can be used in the
server-side build configuration tab?
(I NEED to set classpath and some command line arguments for ant in the
build configuration, depending on the BUILD WORKING DIR. Because of lack of
documentation, I am forced to hardcode the absolute paths. )
Thanks in advance.
Gaston Martin
gmartin@bea.com
Please sign in to leave a comment.
Gaston Martin wrote:
You can reference other variables in TeamCity configuration using syntax like
%system.build.number% for system java variables or %env.HOME% for environment variables. In your
build script you should reference them according to the type of build runner, for instance, use
${build.number} for Ant.
It is not platform-dependant.
On agent you have access to all environment variables and to system properties defined in
buildAgent.properties configuration file. You can also use %build.working.dir% variable to access
build's CWD (if you need to).
Server also passes some additional variables, like
%system.build.number% for build number, configured in TeamCity
and
%system.build.vcs.number.1%, %system.build.vcs.number.2% - changelist numbers, defined by
underlying VCS (there are several because you may have several VCS.
Hope this helps,
KIR
--
Kirill Maximov
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Good Day!
We're trying to send e-mail notifications through Ant.
Can we somehow access the changelist for the last build?
Printing the variable ${build.vcs.number.1} in the message body results in display of the last changes time.
Thank you in advance.
Good day,
Why don't you simply use email notifications facilities build in TeamCity?
Regards,
KIR
Uff, up to today we could not set them up properly. Now everything works perfectly well.
Sorry for disturbance.
Good day, I have some small questions about TeamCity notificator.
1. How can I tune message encoding?
2. How can I send messages in HTML format?
3. How can I include the complete changelist with the names of files changed?
4. Can I somehow remove html-link for more information about changelist?
Thank you in advance.
Hello,
Well, for now you can't do this. Please file a JIRA request if you need
these features.
--
Pavel Sher
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"