7

Given a Command line build step, with the following custom script:

msdeploy -verb:sync -source:package='%teamcity.build.projectid%\%WebProjectName%.csproj.zip'

how can i see what the variables ended up being replaced with?

I don't see any "verbose logging" option that holds the final output for debugging the build server anywhere

enorl76
  • 2,562
  • 1
  • 25
  • 38
  • same problem here: freaks me out there is no such option to log entire script that get executed. Without that obvious thing if problem happens you have no clue why it happens unless you wrote custom scripts. – Pavel P Jan 11 '17 at 23:15
  • 2
    As a hack, on the build server and in the buildAgent temp directory, I ended up grabbing the generated script via copy *.* operation to end up seeing the resultant script. This should be a first-class concept in teamcity without having to resort to hacking of this sort. – enorl76 Jan 13 '17 at 16:09

5 Answers5

0

There's Parameters tab (accessible like http://teamcity/viewLog.html?buildId=BUILD_ID&tab=buildParameters where BUILD_ID should be replaced with id of the given build) in Build overview.

There're parameters values as they were resolved when build started.

This page is also accessible via popup displayed at the end of a build status text in build results row in Build Configuration Overview or Project view.

cyberskunk
  • 1,722
  • 20
  • 22
0

There is a file in [tempdirectory]\agentTmp called build.start.properties.gz open with something like winrar or 7zip and there is a file called build.start.properties.

In there you will be able to see the parameters used for the build like %teamcity.build.projectid%

AndrewThompson
  • 391
  • 2
  • 9
0

In case anyone else comes here, the reson you are probably looking for that file is that your script isnt working, I would suggest you change

-source:package='%teamcity.build.projectid%\%WebProjectName%.csproj.zip'

"%WebProjectName%"

and include double quotes around your variables, if WebProjectName contains spaces your script might not work.

AndrewThompson
  • 391
  • 2
  • 9
0

If your custom script is running in Unix-like environment you can use shell command set -x to print each command before execution

Full explanation here https://stackoverflow.com/a/2853811/2584381

borislubimov
  • 131
  • 1
  • 3
0

If you are running on Windows, your command step has an implicit @echo off at the start. To get full info in the logs, add

echo on

to the top of your command script.

Kristján Valur
  • 137
  • 1
  • 2