teamcity-9.0

TeamCity NuGet package build for different .NET Frameworks

╄→гoц情女王★ 提交于 2019-12-05 14:05:44
I've been doing updates to .NET Framework targeted versions of projects updating to latest .NET (4.6.2). Some of these projects are NuGet packages, built in TeamCity 9.0.2. I've use the steps in this guide to create multiple build configurations for different .NET Framework version as some of the projects I haven't updated to 4.6.2 reference the NuGet packages. So I am trying to get TeamCity to use these build configurations to output the various Net40, Net45, Net46 and Net462 versions so that I have full compatibility without forcing the need to upgrade all projects that use the NuGet when

How to run a build step conditionally in TeamCity

醉酒当歌 提交于 2019-12-04 22:32:42
This is a more generic version of this question: How to run a build step on a specific branch only? For example, I can use a PowerShell script to run MSBuild if '%teamcity.build.branch.is_default%' -eq 'true' or if '%teamcity.build.branch%' -eq 'master' but then I will miss the collapsible log that comes with the TeamCity MSBuild build runner. Isn't there any easier way to conditionally run a build step? Alina Mishina It is not possible to execute build step based on condition. Vote for the related request: https://youtrack.jetbrains.com/issue/TW-17939 . The recommended approach is to create

How to get TeamCity Build trigger filter to build feature branches but not default branch

我与影子孤独终老i 提交于 2019-12-04 20:49:38
问题 I've created a Team City build to build the feature branches: Default Branch: refs/heads/development Branch Specification: refs/heads/feature/* I have a vcs trigger so it builds for every git push. But I don't want it to build when someone pushes to the development branch. I have tried playing with the branch filter in the trigger, but either features and development build on push, or none of them do. I'm using TC 9.1.1 回答1: Try the following settings: Default Branch: refs/heads/development

TeamCity with BitBucket Cloud Commit Status Publisher. 404 Errors

旧街凉风 提交于 2019-12-04 18:05:48
I'm having problems getting the commit status publisher to work. Details: TeamCity 9.1 Commit Status Publisher Plugin version: snapshot-20160523141816 Bitbucket Cloud git repository type on bitbucket.org VCS Settings: Configured to use the private key auth (w/ uploaded key) Multiple branches configured. Not using VCS Labeling No PUSH URL specified (should be failing back to FETCH URL, right?) Commit Status Publisher Settings: I've experimented with these settings, neither email addresses nor usernames work. But whenever something should publish a commit message, I get this pop up in the

Run a build step on a specific branch only

只愿长相守 提交于 2019-12-04 06:04:59
I have a build configuration containing two build steps "Build" and "Deploy". This build configuration is using a Git VCS and is configured to run all branches. Let's assume that I currently have two branches "master" and "Feature in Development". I want to divide the "Deploy" step into two. "Deploy Production" and "Deploy Beta". The "Deploy Production" step should only be executed when the master branch was changed and is currently building. Is there a built in possibility to do that or do I have to check the %teamcity.build.branch.is_default% variable manually within the script? It seems

How to get TeamCity Build trigger filter to build feature branches but not default branch

旧巷老猫 提交于 2019-12-03 13:36:52
I've created a Team City build to build the feature branches: Default Branch: refs/heads/development Branch Specification: refs/heads/feature/* I have a vcs trigger so it builds for every git push. But I don't want it to build when someone pushes to the development branch. I have tried playing with the branch filter in the trigger, but either features and development build on push, or none of them do. I'm using TC 9.1.1 Alina Mishina Try the following settings: Default Branch: refs/heads/development Branch Specification: +:refs/heads/feature/* VCS trigger branch filter: +:* -:<default> We are

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 9: How to add git short hash into assembly info patcher

可紊 提交于 2019-12-02 18:16:27
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. If you want to write this to the Assembly Info field it can be done, but it requires a separate build configuration to generate the build number. The sole purpose of this step is to create the build number that has the hash

Running xUnit tests on Teamcity using async methods

こ雲淡風輕ζ 提交于 2019-12-01 06:32:01
问题 I made the following xUnit test which is using a HttpClient to call a status api method on a webserver. [Fact] public void AmIAliveTest() { var server = TestServer.Create<Startup>(); var httpClient = server.HttpClient; var response = httpClient.GetAsync("/api/status").Result; response.StatusCode.Should().Be(HttpStatusCode.OK); var resultString = response.Content.ReadAsAsync<string>().Result; resultString.Should().Be("I am alive!"); } This test is running fine locally. But when I commit the