What is the system variable for the name of the build step?

I see system.teamcity.projectName and system.teamcity.buildConfName but I do not see a corresponding property for the currently executing build step name.  Is there a value for it somewhere?

Comment actions Permalink

There is no such property at the moment. Why do you need it?

Comment actions Permalink

We are trying to describe in the UI status what is going on instead of it just saying it is running the default task.  We have a few long running tasks and the lack of feedback is hard on our users.

If we had that variable, we wouldn't have to hardcode a ton of strings.  It would be even better if TC would use that instead.  If the task is the default one, it should display the step name. If it is not, I would think the step name and task name would be appropriate.

Comment actions Permalink

Is it possible to provide an example of such tasks and how they are reported by TeamCity?

Comment actions Permalink

In our dropping databases build step at the top we write out:

  puts "##teamcity[progressMessage 'Dropping databases...']"

When provisioning data, we do something similiar.  We have to do this or for 20 minutes we'll see:

"Execute default"

In TeamCity's status area.
Comment actions Permalink

Could you post a build log please.
Rake runner should display name of current executing task.

Comment actions Permalink

It does output the step names in the log and the task name gets outputed to the UI, however, we are wanting it to display the step name in the UI (as that gives the user an idea of what's going on).  We know that we could name our targets and get that name to come out but that wouldn't be descriptive English, it would be programmer-ese.

[14:43:56]: Step 1/8: Validate custom run input (Rake) (2s)
[14:43:58]: [Step 1/8] Starting: C:\Ruby192\bin/ruby.exe C:\BuildAgent\plugins\rake-runner\lib\rb\runner\rakerunner.rb --rakefile C:\BuildAgent\work\ae52336cf55187ad\BuildScripts\TeamCity\Deploy\validate_custom_run_input.rb
[14:43:58]: [Step 1/8] in directory: C:\BuildAgent\work\ae52336cf55187ad
[14:43:59]: [Step 1/8] (in C:/BuildAgent/work/ae52336cf55187ad)
[14:43:59]: [Step 1/8] Execute default
[14:43:59]: [Execute default] Validating deployment name...
[14:43:59]: [Step 1/8] Process exited with code 0
[14:43:59]: Step 2/8: Prepare deployment (Rake) (12m:20s)
[14:44:03]: [Step 2/8] Starting: C:\Ruby192\bin/ruby.exe C:\BuildAgent\plugins\rake-runner\lib\rb\runner\rakerunner.rb --rakefile C:\BuildAgent\work\ae52336cf55187ad\BuildScripts\TeamCity\Deploy\prepare_deployment.rb
[14:44:03]: [Step 2/8] in directory: C:\BuildAgent\work\ae52336cf55187ad
[14:44:04]: [Step 2/8] (in C:/BuildAgent/work/ae52336cf55187ad)
[14:44:11]: [Step 2/8] Execute default (12m:07s)
[14:44:11]: [Execute default] Preparing the environment...
[14:56:19]: [Step 2/8] Process exited with code 0
[14:56:19]: Step 3/8: Drop Databases (Rake) (15s)
[14:56:24]: [Step 3/8] Starting: C:\Ruby192\bin/ruby.exe C:\BuildAgent\plugins\rake-runner\lib\rb\runner\rakerunner.rb --rakefile C:\BuildAgent\work\ae52336cf55187ad\BuildScripts\TeamCity\Deploy\drop_databases.rb
[14:56:24]: [Step 3/8] in directory: C:\BuildAgent\work\ae52336cf55187ad
[14:56:25]: [Step 3/8] (in C:/BuildAgent/work/ae52336cf55187ad)
[14:56:25]: [Step 3/8] **Notice: C extension not loaded. This is required for optimum MongoDB Ruby driver performance.
[14:56:25]: [Step 3/8] You can install the extension as follows:
[14:56:25]: [Step 3/8] gem install bson_ext
[14:56:25]: [Step 3/8] If you continue to receive this message after installing, make sure that the
[14:56:25]: [Step 3/8] bson_ext gem is in your load path and that the bson_ext and mongo gems are of the same version.
[14:56:27]: [Step 3/8] Execute default (8s)

In this example, I would want the user to see the following messages:

Validate custom run input
Prepare deployment
Drop Databases

Comment actions Permalink

Thank you for detailed explanation, very helpful.

I've created a feature request for you in TW-18675, please vote and watch for updates.



Please sign in to leave a comment.