teamcity

Running update-database from Team City

僤鯓⒐⒋嵵緔 提交于 2019-12-03 05:51:15
问题 I have created a new application using Entity Framework 4.3 database migrations. The migrations work great from the package manager console using the "update-database" command. Now I want to run the database migrations every time the application is built using Team City, it looks like I need to create a powershell script that will do this. Can anyone point me to some instructions on how to get the package manager commands to run from the command line, or powershell? All I can find is

Teamcity 9: How to add git short hash into assembly info patcher

萝らか妹 提交于 2019-12-03 05:46:18
问题 I'm trying to use assembly info patcher to create a version number something like: 1.2.3.1a3c19e where the last bit is the git short hash. I've tried using a powershell script build step to create the short hash (as I cant find a variable that has it) and adding this to a system variable but this build step appears to run after assembly info patcher, so isn't much use. 回答1: If you want to write this to the Assembly Info field it can be done, but it requires a separate build configuration to

TeamCity agent error “failed to perform checkout on agent”

时光毁灭记忆、已成空白 提交于 2019-12-03 05:37:24
I am running my TeamCity 7 server and agent on MacOS. My repo is on github. I use ssh and I know that the authentication is correctly configured, because the test is successful. The build works fine when I use VCS Checkout Mode "Automatically on server", however when I use VCS Checkout mode "Automatically on agent" I get this error. [13:40:35][Updating sources] Failed to perform checkout on agent: '/usr/bin/git fetch --progress origin +refs/heads/master:refs/remotes/origin/master' command failed. stderr: java.io.IOException: Authentication failed at org.jetbrains.git4idea.ssh.SSHMain

Full list of /P MSDeploy arguments for MSBuild from TeamCity

橙三吉。 提交于 2019-12-03 05:34:43
I currently use the MSBuild runner in TeamCity for continuous integration on my local server and this works very well. However, I'm having trouble finding a full list of supported command line switches for MSDeploy in the format that TeamCity expects them. In my 'Parameters' section at the moment I using the following switches: /P:Configuration=OnCommit /P:DeployOnBuild=True /P:DeployTarget=MSDeployPublish /P:MsDeployServiceUrl=https://CIServer:8172/MsDeploy.axd /P:AllowUntrustedCertificate=True /P:MSDeployPublishMethod=WMSvc /P:CreatePackageOnPublish=True /P:UserName=Kaine /P:Password=*******

How to install nUnit 3 nunit3-console.exe in TeamCity 9.x

不打扰是莪最后的温柔 提交于 2019-12-03 05:11:22
NUnit 3.0 is supported by TeamCity 9.1.x now however you have to install the runner and specify the path to the nunit3.console.exe in the step. My question is where do I copy the nunit3-console.exe? Do I have to put this on all the agents? Do I put it in a directory on my main TeamCity server and it will get shared or pulled by the agents? There doesn't seem to be good documentation on where to copy these files so that all the agents can use them. You should have the NUnit console on the each agent where you would like to run NUnit tests. The best option is: Add reference to the NuGet package

TeamCity build agent becomes disconnected after adding self-signed https certificate to teamcity

我的梦境 提交于 2019-12-03 05:09:15
问题 I added a self-signed certificate to my Teamcity BuildServer to introduce https support so that it can now be accessed at https://ServerUrl:8443 (More details about how here ) The result was that I was able access the server via https, but my build agent was now disconnected. How to fix this? 回答1: The build agent works as a client to the build server and communicates with it using http/https, and it turns out that when you add a self-signed certificate the build agent does not accept it. I

TeamCity Current Date variable in MMdd format

岁酱吖の 提交于 2019-12-03 04:52:39
问题 In TeamCity is there an easy way to get a variable for the current date in the format MMdd (eg 0811 for 8-Aug)? My google-fu did not turn up an existing plugins. I looked into writing a plugin, but not having a jdk installed, that looks time consuming. 回答1: The Groovy Plugin for TeamCity provides build start date/time properties: Provides build properties: system.build.start.date / env.BUILD_START_DATE system.build.start.time / env.BUILD_START_TIME This blog post has installation /

How can I run multiple instances of TeamCity on the same server?

感情迁移 提交于 2019-12-03 04:30:53
问题 I am on Windows and trying to run multiple (currently two) instances of TeamCity on the same server. I chose not to install the Windows services and instead run the server via runAll.bat start command. When I ran the installer I chose different ports, names and paths for each one. The first server starts successfully, but the second one does not - I see the tomcat window showing up, but it's gone after a while, though the build agent window stays. Here's some output: c:\Tools\TeamCity\bin

Publish artifacts after certain build step

我们两清 提交于 2019-12-03 04:26:16
问题 I've setup build configuration in TeamCity with 3 steps: Build solution Do unit tests Upload artifacts to FTP For FTP uploading I've used FTPUpload plugin, taken from http://teamcityrunners.codeplex.com/. Folder to upload was set to absolute path: %userprofile%\.BuildServer\system\artifacts\%env.TEAMCITY_PROJECT_NAME%\%env.TEAMCITY_BUILDCONF_NAME%\%env.BUILD_NUMBER%\ According to build log, artifacts publishing take place only after all steps have been completed. Is it possible to configure

Is there a recommended approach to configuring a NuGet package targeting multiple frameworks in TeamCity using MSBuild?

独自空忆成欢 提交于 2019-12-03 04:00:45
问题 I've read a handful of posts (see references below) and have yet to find a guide on best practices that is specific to my tech stack. The goal: Create a single NuGet package targeting multiple .NET frameworks built from a single .csproj file via TeamCity using MSBuild and NuGet. The constraints: Pull the code from the VCS only once. All compiled assemblies should be versioned the same. Single .csproj (not one per target framework). I have two approaches in mind: Create a single build