TFS Aggregator Common Use Cases

July 7, 2018

After receiving several questions about my previous post about Meeting the TFS Aggregator I decided to go deeper in this topic with a new post. The idea is to expose some common use cases and their implementation for them that are getting started. Before reading the post I highly recommend reading the official documentation to understand the syntax basics.   Let's implement the following use cases: Update PBI state to "Committed" when any child gets moved to "In Progress" Update PBI state to "Done" when all childrens get moved to "Done" or "Removed" Set a "calculated" field in a Task Create new work items and links Update...

Configure a CI build for each commit

February 5, 2018

By default in TFS/VSTS, the CI build configuration is used to trigger a build after each push. Additionally there is a option to "batch changes" (queue a build with all the changes since the last build instead of queue a build for each push). However there are some cases where you want to build each introduced commit separately. It's true that there is no way to do it automatically OOB, but in this post I want to share a way to achieve it with a little creativity (and code).   The Idea Create two different build definitions: - Listener Definition: Catch every push,...

TFS Powershell Module

February 2, 2018

A couple of months ago I started to write a Powershell Module to use the TFS Rest API from Powershell scripts. You can find and download it from GitHub. I personally use it for builds, releases and for integration/automation tools. The module helps me to create a much cleaner, shorter and easier scripts to interact with TFS/VSTS. Most of the functions works for TFS 2015.3 and above (including VSTS) but there are a couple of functions (lock git branch for example) that were introduced in later versions. The module is strongly documented and each function has a detailed explanation about...

Run Git Commands from Java Applications

January 30, 2018

A few days ago I came across the following question: "how to execute git commands from a java application". After a little research I found a library called JGit which fulfilled my expectations. In this post I will explain how to use this library to execute the basic commands.   To import the library, add the following dependency to your pom file: <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit</artifactId> <version>4.10.0.201712302008-r</version> </dependency>   Then you will be able to import and use the JGit classes import org.eclipse.jgit.*;   To clone a repository you can use the following method: public...
no comments

Microsoft ALM User Group – What’s new in TFS 2018

January 29, 2018

Last Wednesday 09/01/18 I gave a talk about the new features in TFS 2018 in Microsoft Raanana as part of the ALM User Group. In this talk we reviewed the new features and improvements introduced in TFS 2018, upgrade considerations and general Q&A. Many thanks to all for coming and I hope you enjoyed it as much as I did. If you have any questions, you know how to contact me. See you next time, Leon Jalfon   PDF: WhatsNewInTFS2018.pdf  
no comments

Getting Started with Google Container Builder – Part 6

November 21, 2017

Note: This is the sixth part in a series of posts Getting Started with Google Container Builder   Add build notifications using Cloud Functions In this part we will use Cloud functions to configure notifications for our builds (failed builds). In this example we will send the email notifications through Mailgun.   • Create a Google Storage bucket to store the function source code gsutil mb gs://   • Create a folder to store the function files mkdir ~/gcb_email cd ~/gcb_email   • Create the functions files below: { "MAILGUN_API_KEY":"<your-mailgun-api-key>", "MAILGUN_DOMAIN":"<your-mailgun-domain>", "MAILGUN_FROM":"<email-from-address>", ...

Getting Started with Google Container Builder – Part 5

November 20, 2017

Note: This is the fifth part in a series of posts Getting Started with Google Container Builder   Create a custom builder and add a build step to run the tests In this part we will create a custom builder and use it to add a build step to test the application. For this purpose we will create a custom build step to run npm using the jasmine module.   • Open the Cloud Shell and create a folder to store the custom builder source code mkdir ~/npm-jasmine-node cd ~/npm-jasmine-node   • Create a Dockerfile to use the npm builder as the base image, install the...

Getting Started with Google Container Builder – Part 4

Note: This is the fourth part in a series of posts Getting Started with Google Container Builder   Configure CD to Kubernetes In this part we will configure the build to deploy the application to our Kubernetes cluster after each commit (CD).   • Add a new kubectl step in the cloudbuild.yaml file to replace the image used by kubernetes to run the application: steps: - name: 'gcr.io/cloud-builders/npm' args: - name: 'gcr.io/cloud-builders/docker' args: - name: 'gcr.io/cloud-builders/kubectl' args: env: - 'CLOUDSDK_COMPUTE_ZONE=europe-west1-c' - 'CLOUDSDK_CONTAINER_CLUSTER=demo-cluster' images: - 'gcr.io/$PROJECT_ID/sdp-demo-app' tags: - 'demo' - 'nodejs'   • Change the application message...

Getting Started with Google Container Builder – Part 3

Note: This is the third part in a series of posts Getting Started with Google Container Builder   Configure Google Kubernetes Engine and deploy the application In this part we will configure a simple Kubernetes cluster to use it to deploy the application. Variables that will be used in this demo: : sdp-demo-185120 : europe-west1-c : europe-west1 : demo-cluster   • Open the shell console and set the following variables: gcloud config set project gcloud config set compute/zone gcloud config set compute/region   • Confirm that the variables were set gcloud config list   • Create a kubernetes cluster gcloud container clusters create --num-nodes 3   •...

Getting Started with Google Container Builder – Part 2

Note: This is the second part in a series of posts Getting Started with Google Container Builder   Configure basic CI to create Docker images and store them in Google Container Registry In this part we will create the most basic build possible, just create a docker image and store it in Google Container Registry to use it later.   • Create a new file in the repository root: cloudbuild.yaml   • Add the below to the file to use the npm builder to run npm install and the docker builder to build the docker image: steps: - name: 'gcr.io/cloud-builders/npm' args: - name: 'gcr.io/cloud-builders/docker' args:...