With the news that Microsoft is acquiring GitHub, I thought I would ask the team what their thoughts are on the topic. We utilize the .NE...
Security is an essential part of any application ecosystem, but it can also be a nebulous concept for an organization to grasp. During ou...development
Let’s say you are developing a new Infinity War SQL stored procedure. Thanos, your boss, has explicity told you to add validation to a st...development c# sql
Data can often be messy and cleaning it up falls on the shoulders of you, the developer. It’s also easy to search StackOverflow for compl...development
Referencing nested objects in your LINQ to SQL query does some pretty neat magic “behind the scenes”. But, there are occasions when its m...EF SQL
The RimDev.Stuntman NuGet package has reached version 2.0! Unified package with ASP.NET Core 2.0 Support Both ASP.NET full framework an...OSS
At Ritter Insurance Marketing we value our peers and other organizations in the overall software community. We believe in the power of c...OSS
Software development is a funny thing. As I develop my skills, I begin to form an idea of what’s right and wrong, what’s up and down. Thi...elasticsearch
At Ritter Insurance Marketing we have a number of repositories, each with separate continuous integration builds. This is a base setup f....NET Cake AppVeyor
In the whirlwind that is modern web development, I thought it would be a great idea to revisit one of the fundamental parts that make the...HTML Web
Picture a scenario where you want to page a large dataset and your LINQ statement has several Include-calls. The first few pages load fai....NET SQL Server LINQ
Setting up a local server comes in many flavours today. My goto was the Apache vhost.conf/hosts combo, now to load something quickly - Gu...gulp
[Hacktoberfest 2017][hacktoberfest] is upon us and now is a great opportunity to contribute to open source and the community as a whole. ...OSS
On our team TeamCity server we build repositories by default using
build.cmd in the repository root. This has a few advantages.
One advantage is being able to run what TeamCity runs locally. It isn’t perfect – your machine can still be different from the TeamCity build agent. But, it allows running the same commands consistently. This can greatly improve the experience of debugging works on my machine issues.
Another advantage is keeping any complex build setup in the repository. Files in repositories are versioned and follow the familiar pattern of submitting changes via pull requests.
Here’s a simple
build.cmd to get started (this one is useful for Node.js, but can be adapted for your needs!):
@echo Off pushd %~dp0 setlocal :Build call npm install call npm test if %ERRORLEVEL% neq 0 goto BuildFail goto BuildSuccess :BuildFail echo. echo *** BUILD FAILED *** goto End :BuildSuccess echo. echo *** BUILD SUCCEEDED *** goto End :End echo. popd exit /B %ERRORLEVEL%
In this case, the build will run
call npm install and
call npm test in order. You can modify these steps as necessary.
When creating a new build configuration for a project, a template can have
build.cmd usage baked in. This consistency makes it faster and easier to setup a build configuration for new projects.
Team members can assume
build.cmd will be ran for each TeamCity build. Having a consistent build script makes setting up new projects in TeamCity faster and easier, since executing
build.cmd is included as part of a template. And, if a pull request fails to build unexpectedly a quick
git clean -xdf and
./build.cmd can run what the build agent ran!
build.cmd enhances our team development experience by providing consistency.
build.cmd works locally and fails on a TeamCity build agent, this post won’t help you! :-)