But be aware that if you are using Grunt, you’ll need the Grunt command line to be available to your build, either by adding an initial NPM runner step which does an “install grunt-cli”, or by installing it globally ( Warren Buckley covered this approach in a helpful post whilst at Cogworks) *Again could be Grunt if that’s what you use. So the front-end elements of our build process followed this sequence: I’ve previously written about how we setup our TeamCity instance, and mentioned Eugene Petrenko’s TeamCity plugin for running Node.js, NPM, Gulp and Grunt. With NodeJs and NPM installed as pre-requisites on all the agents, it was then fairly straightforward to add steps to our build configuration which invoke the Front-End pipeline. The following line from this script installs NodeJs v4.5.0, which in turn brings Node package manager (NPM) v2.15.9 along for the ride: To accomplish this, we have a batch script which uses Chocolatey to install dependencies on agents. We installed a particular version of NodeJs on all our TeamCity build agents. So in the early days of our build process, things were nice and simple. Welcome to the Inferno… Beginner Level: Fixed Node Version I’ve lost countless hours Googling, reading StackOverflow posts and mailing list discussions to get to the bottom of all manner of bugs, caveats and gotchas, so it felt right that I share my experiences. The reality is that getting this all working definitely isn’t the well-trodden path that I expected. Layered on top of that you then have Node, NPM, Gulp and all the various package dependencies that your particular pipeline and solution brings in. However, the first issue to understand (and one of the primary factors in what’s to follow) is that all of our back-end work is done on the Microsoft stack, and so our TeamCity Agents are Windows Server VM’s. In theory, this should be straightforward if you’re using TeamCity – it’s a powerful and flexible product. *Most of what’s in this post probably applies equally to Grunt.ĭon’t have a centralised build server set up? I strongly recommend you buy a copy of Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation to understand not only build automation, but further techniques to improve both speed and quality of your software releases. You’ve worked hard to perfect all that lovely unit testing, linting, CSS precompilation and so on in your Gulp* build, so this part of your software packaging process should be a first-class citizen in your automated build process. If you’re building Web applications using TeamCity, you’re probably going to want to execute your Front-End pipeline as part of the build.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |