Merge redundant build jobs into a single template