logging - TFS 2013 default template run powershell script and log output -


running powershell script within build process has become really straight forward vs 2013. unfortunately no write-host commands being logged tfs build log.

so after build completed cannot log file , see powershell shell script did.

the log file says:

run optional script after msbuild 00:03 run optional script before test runner 00:00 run vs test runner 00:00 run optional script after test runner 00:00 ... 

the activitylog.agentscope.1.xml log file more talkative still has few information.

run optional script after msbuild00:00:03 inputsenvironmentvariables:  enabled: true arguments:  filepath: $/cmp04/some/project/main/web/.scripts/ci/ci.ps1  outputsresult: 0  c:\windows\system32\windowspowershell\v1.0\powershell.exe -executionpolicy remotesigned -noprofile -noninteractive -file "d:\ws_build\1\cmp04\ip-main\src\some\project\main\web\.scripts\ci\ci.ps1" 

any idea how can debugging information tfs build logs? i of course create log file, plan b :)

edit: write-host being logged agent's log xml. write-verbose not.

explicitly setting verbosity on default build templates gone in vs 2013; instead every build logs diagnostic info. raw data gets dumped agent's xml log in build drops folder mentioned. nice view of though, have access team web access; can't visual studio anymore, makes sense since viewing diagnostic logs in visual studio cause vs hang.

so view diagnostic log in team web access, can either:

  • if using vs 2013, can right-click on build in build explorer , choose open in browser.

or

  • from team project page in team web access, select build tab, find build interested in , double-click it, , select diagnostics tab.

the following have found experimentation on tfs 2013 update 2:

in build summary , log views (the 2 views available within vs), write-error messages show up. using write-error in powershell scripts not mark build failed, instead cause partially succeed.

in diagnostics view, write-host, write-output, write-warning, , write-error show up. write-verbose , write-debug not show though, if pass -verbose , -debug switches powershell script argument.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -