Visual Studio and Azure DevOps Git: Extend the git command line with server commands–Part 2
The former post in this series showed how you could add aliases to the git command line, and showed how some simple aliases can simplify your command line work.
This post show how you can extend that to work more actively with the Azure DevOps (formerly known as VSTS) server hosting your repository. (If you don’t have an account here, please consider doing that, it is free for modest individual use!)
You can do all of this from the combination of Visual Studio, and the web browser, but going through all those UI’s is like a good friend said: “and after 56 more clicks…..". Using the command line is just so much faster - but in order to be effective the number of parameters must be cut down to something manageable. And that is what this is about!
How to conditionally fail a build in a pull requests with TFS/VSTS
When your TFS/VSTS CI build is also used for a pull request, you often want to enable more checks before you let this go into the master (or any target) branch, and fail the build if these raise warnings.
It can be extra tests you want to run, code quality checks, process checks, and you might want to block the pull request if you have warnings from these.
Setting a single test task to fail could be done, but that only works well if you have a single step, with multiple tasks you will have build stops for one and every step, so it also reduces the error reporting granularity. And, it is nice to be able to see what is an absolutely blocker, red, and what is quality issues, yellow.