teamcity

Can't get basic Powershell script running inside Team City

删除回忆录丶 提交于 2019-11-27 17:56:58
问题 Here's my configuration: On the build log, I only see the output of the first two lines, and then "Process exited with code 0" as the last output of this build step. I tried opening a terminal in the build server in the SYSTEM account (using PsTools), since Team City is configured to run under said account. Then, I created a Test.ps1 file with the same content and ran a command just like Team City's: [Step 1/4] Starting: C:\Windows\system32\cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1

Why are my PowerShell exit codes always “0”?

百般思念 提交于 2019-11-27 17:56:18
I've got a PowerShell script as follows ##teamcity[progressMessage 'Beginning build'] # If the build computer is not running the appropriate version of .NET, then the build will not run. Throw an error immediately. if( (ls "$env:windir\Microsoft.NET\Framework\v4.0*") -eq $null ) { throw "This project requires .NET 4.0 to compile. Unfortunately .NET 4.0 doesn't appear to be installed on this machine." ##teamcity[buildStatus status='FAILURE' ] } ##teamcity[progressMessage 'Setting up variables'] # Set up variables for the build script $invocation = (Get-Variable MyInvocation).Value

Gated check-ins / pre-tested commits for Git?

馋奶兔 提交于 2019-11-27 17:32:09
I'm looking at migrating from TFS (Team Foundation Server) to Git, but can't find anything matching TFS' support for gated check-ins (also called pre-tested or delayed commits). Atlassian Bamboo has no support for gated check-ins. TeamCity does support it ("delayed commits" using their terminology), but not for Git. Using Jenkins by itself or Jenkins+Gerrit has huge drawbacks and doesn't come close to the gated check-in functionality in TFS. (Drawbacks explained by the creator of Jenkins himself in this video: http://www.youtube.com/watch?v=LvCVw5gnAo0 ) Git is very popular (for good reason),

Teamcity running build steps even when tests fail

时光总嘲笑我的痴心妄想 提交于 2019-11-27 17:14:01
问题 I am having problems with Teamcity , where it is proceeding to run build steps even if the previous ones were unsuccessful. The final step of my Build configuration deploys my site, which I do not want it to do if any of my tests fail. Each build step is set to only execute if all previous steps were successful. In the Build Failure Conditions tab, I have checked the following options under Fail build if: -build process exit code is not zero -at least one test failed -an out-of-memory or

Conditionally execute a TeamCity build step

ⅰ亾dé卋堺 提交于 2019-11-27 17:04:48
问题 I am working on defining a general-purpose build template for all our projects -- which I have placed at the "root project" level (thanks to this new feature of TeamCity 8). Some of our projects create an installer, which needs to be generated by a separate "build step" that runs a powershell script. However, some of our projects do not create this installer, and hence do not need this additional build step. Is there a way to conditionally execute a build step, based on a build parameter? I

npm check and update package if needed

拈花ヽ惹草 提交于 2019-11-27 16:33:42
We need to integrate Karma test runner into TeamCity and for that I'd like to give sys-engineers small script (powershell or whatever) that would: pick up desired version number from some config file (I guess I can put it as a comment right in the karma.conf.js ) check if the defined version of karma runner installed in npm's global repo if it's not, or the installed version is older than desired: pick up and install right version run it: karma start .\Scripts-Tests\karma.conf.js --reporters teamcity --single-run So my real question is: "how can one check in a script, if desired version of

MsBuild not finding publish profile

十年热恋 提交于 2019-11-27 16:13:32
问题 I have a VS 2012 solution that contains two projects (WCF C# Service App and a VB Web UI) that I'm trying to deploy via TeamCity/MsBuild command line. Each project contains a publish profile - let's call it "Test Profile" - that works fine when executed from withing the IDE. However, when executed as two consecutive build steps, the C# project deploys fine, but the VB project fails with the following error: [09:27:05][ValidatePublishProfileSettings] GetPublishingLocalizedString [09:27:05]

TeamCity: On successful build push to Git Repo

纵然是瞬间 提交于 2019-11-27 14:53:57
问题 Can TeamCity push successful builds to a git repository? I cannot see a specific build step in TeamCity to do this. I use the version 7.1.1 of TeamCity Thanks, Henrik UPDATE: Ok thanks for your answer, I find it a bit complicated. I found out that I can simply push back tags on successful builds to my global repository from which TeamCity fetches data for the build. I can pull changes from it and see whether the last commits were successful. I would be happy if TeamCity provided a simple

Building Portable Class Library Project in build server fails

梦想的初衷 提交于 2019-11-27 14:22:20
I've recently added some custom Portable Class Library projects to an application that is built in an build server. The build was working fine, but after that it stopped working and shows me the following messages: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(983, 5): warning MSB3644: The reference assemblies for framework ".NETPortable,Version=v4.0,Profile=Profile136" were not found. C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578, 5): warning MSB3270: There was a mismatch between the processor architecture of the project being built

Using git commands in a TeamCity Build Step

点点圈 提交于 2019-11-27 14:20:07
问题 One of my TeamCity v7.0 build projects relies on using a diff between the current development branch and the master branch to determine what needs to be run. I've written a small script that uses something like: git diff origin/master..origin/QA --name-only --diff-filter=AM | DoSomethingWithThoseFiles Unfortunately, the build log indicates that git diff is not working. When I go into the buildAgent/work directory for this project, I see that there is no .git folder, so it cannot perform the