teamcity

k8s授权探索杂记

做~自己de王妃 提交于 2019-11-30 05:47:35
参与的一个项目,部署再阿里云k8s上。 出于安全考虑k8s账号身份验证信息只有我和另一个同事有,其他同事开发完功能要部署到线上需要我手动使用kubectl更新。 像我这样的懒人是不愿意做这种简单而重复无聊的更新操作的。 要自动化很简单,teamcity持续集成构建部署分分钟的事,问题是:身份验证信息,不能放到teamcity上去。 所以,我需要弄一个受限的k8s账号,只允许执行更新操作。 浏览了一下k8s文档 Controlling Access to the Kubernetes API 章节,控制API访问权限显然有的。 只是:我需要控制哪个API访问权限了?更新的时候执行的是 kubectl rollout restart deployments 命令,可是这个命令到底调用了哪个API了?不知道。 看这样子应该是 deployment API 了: 可是看哪个都不像restart啊。 ”要是能给kubectl设置个代理通过Fiddler拦截到kubectl发送的请求就好了“,我默念。 google kubectl proxy,搜到的全是 kubectl proxy 命令的用法。 无奈继续看官方文档,终于看到设置日志 Kubectl output verbosity and debugging --v=8 Display HTTP request contents,要的就是这个

Creating one NuGet package from multiple projects in one solution

橙三吉。 提交于 2019-11-30 04:50:24
I have a solution that I'm working on that contains 4 class library projects ( A , B , C , D ). A and B could be considered the top level projects in the solution. Both A and B reference C , and D stands alone. These four projects represent a group of services that I have made that handle an automated workflow. They are all closely related, and will only be used in one location (the service manager) so I don't want to split them into different solutions. My problem is that I want to create a single NuGet package that will contain all 4 libraries, without having to build them all and gather up

How do I deploy using MSDeploy and TeamCity with Integrated Windows Authentication?

為{幸葍}努か 提交于 2019-11-30 04:01:22
I had a MSDeploy deployment working beautifully with TeamCity when I passed in the user credentials. The command line parameters (using env. variables for some values) were: MSBuild.exe Web.csproj /P:Configuration=%env.Configuration% /P:DeployOnBuild=True /P:DeployTarget=MSDeployPublish /P:MsDeployServiceUrl= https://%env.TargetServer%/MsDeploy.axd /P:AllowUntrustedCertificate=True /P:MSDeployPublishMethod=WMsvc /P:CreatePackageOnPublish=True /P:UserName=%env.AdminUser% /P:Password=%env.AdminPassword% Worked great. But now I want to use integrated auth. I tried following Troy's suggestions

Teamcity build log

别说谁变了你拦得住时间么 提交于 2019-11-30 03:58:27
I use TeamCity for continious integration. Solution checkouts on deploy machine and builds. Deploy machine running under Windows Server 2008 R2 - Russian. There are russian language PowerShell installed etc. In TeamCity build log, all russian symbols are in wrong encoding. How to change encoding in build log? Pavel Repin change encoding for log4j configuration for build log in conf/teamcity-agent-log4j.xml <appender name="ROLL.BUILD" class="jetbrains.buildServer.util.TCRollingFileAppender"> <param name="file" value="${teamcity_logs}teamcity-build.log"/> <param name="Encoding" value="UTF-8"/> .

How to get the unit test method name at runtime from within the unit test?

我与影子孤独终老i 提交于 2019-11-30 03:09:40
How to get the unit test name from the within unit test? I have the below method inside a BaseTestFixture Class: public string GetCallerMethodName() { var stackTrace = new StackTrace(); StackFrame stackFrame = stackTrace.GetFrame(1); MethodBase methodBase = stackFrame.GetMethod(); return methodBase.Name; } My Test Fixture class inherits from the base one: [TestFixture] public class WhenRegisteringUser : BaseTestFixture { } and I have the below system test: [Test] public void ShouldRegisterThenVerifyEmailThenSignInSuccessfully_WithValidUsersAndSites() { string testMethodName = this

Tracking build progress with TeamCity REST API

廉价感情. 提交于 2019-11-30 02:24:11
I use the TeamCity (7.0) REST API to allow developers to trigger custom builds. I add the build to the queue like this: http://teamcity/httpAuth/action.html?add2Queue=[buildTypeId]&name=[propName]&value=[propValue] My question is how I best can track the progress of the build just triggered. The REST call does not return any info about build ID assigned to the build, so even if I poll the list of builds (running/finished) I will not know if one of them is the one I triggered. There could potentially be several builds for the same buildTypeId in the queue, so I need a way to separate out the

How to setup a TeamCity build for a ASP.NET 5 project

家住魔仙堡 提交于 2019-11-29 23:14:50
I'm trying to setup a CI server for a website that I'm developing, but I can't find any info regarding how to do it with the new ASP.NET 5. We (the ASP.NET team) use TeamCity as the build server. Each repo has a build.cmd file, similar to this one . TeamCity simply invokes that file. For Mac/Linux builds, there is a build.sh file. I got you brother. This took me a few days to figure out. This configuration is on TeamCity v10 for a ASP.NET Core 1.0 RC2/preview2 project. As a bonus, I am including the step where it pushes to Octopus Deploy. You will need to install the dotnet teamcity plugin and

TeamCity - using setParameter to pass information between build steps

痞子三分冷 提交于 2019-11-29 23:05:43
I must be doing something differently than what was asked and answered here because the solution does not appear to be working for me: TeamCity, passing an id generated in one build step to a later build step I want use a string generated by one build step in a final build step. So far I have set up an environmental variable called "TEST" that is empty. Both build steps use the Command Line Runner. Build Step #1: \##teamcity[setParameter name='env.TEST' value='test'] Build Step #2: echo $TEST echo %env.TEST%; Placeholder for now, but if I could access the test string ('test') set in Build Step

*.dll.licenses file in obj directory not created with msbuild in TeamCity

混江龙づ霸主 提交于 2019-11-29 22:48:56
I am working on upgrading our TeamCity projects from VS2012 to VS2015 and I am running into an issue compiling our MVC application. Old MSBuild (v4.0.30319.34209) generates a file in the obj directory called MyApplication.Web.Mvc.dll.licenses which apparently is required for building, but we have no idea what the file is actually used for. New MSBuild (v14.0.23107.0) does not create this MyApplication.Web.Mvc.dll.licenses file, so the build fails with the following error: CSC error CS1566: Error reading resource 'MyApplication.Web.Mvc.dll.licenses' -- 'Could not find file 'C:\BuildAgent\work

Assembly Versioning with TeamCity

*爱你&永不变心* 提交于 2019-11-29 22:26:14
I'm working on a C#/VB.Net project that uses SVN and TeamCity build server. A dozen or so assemblies are produced by the build. I want to control the assembly versions so that they all match up and also match the TeamCity build label. I've configured TeamCity to use a build label of Major.Minor.{Build}.{Revision} Where Major and Minor are constants that I set manually, {Revision} is determined by the SVN repository version at checkout and {Build} is a TeamCity auto-incrementing build counter. So an example build label would be 2.5.437.4423 What techniques would you suggest to ensure that all