Do you want to save 80% of your bandwidth to your search provider? Do you want to deliver content to your users faster? With this one tr...Development Elasticsearch Debugging
If you’re not familiar, or just haven’t used Sass maps, here’s your chance to dive in. Our latest static site was built on Jekyll using ...sass
C# being an Object Oriented Programming (OOP) language, we have access to inheritance. Like any feature of a programming language, you sh...csharp bugs
We love the combination of SQL and Elasticsearch and believe it is a winning combination for anyone building a modern application. Elasti...Elasticsearch NEST C#
I’ve been watching [DotNetConf][dotnetconf] videos over the weekend, and was most curious about [Mads Torgersen’s][mads] [“What’s Coming ...c-sharp C# .NET
Hugo is an amazing static site generator, but getting lost when templating is easier than we’d like. We’ve found a way to evaluate variab...Hugo JAMStack Static
Regardless of your opinion on Object Relational Mappers (ORM), I think they are a great tool for prototyping ideas. Over time, they can l....net core sql
Dealing with JSON data in SQL Database introduces several challenges. This post addresses querying json data stored in SQL Database that...SQL Azure Database development
We are in the middle of writing a template engine to define dynamic forms. The user interface can only post to a known model on the serve...C# development
We are living on the bleeding edge that is Hugo’s release cycle. To keep our macOS development environments up to date we wrote this shel...development
Hugo recently released an amazing asset pipeline, which means you need less external dependencies to build a sweet static site. To take a...dev build
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
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! :-)