{
   "name": "{{BuildDefName}}",
   "type": "build",
   "quality": "definition",
   "buildNumberFormat": "$(BuildDefinitionName)-$(BuildID)",
   "queue": {
      "id": "{{QueueId}}"
   },
   "build": [{
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "refName": "install_bower",
         "displayName": "Install bower",
         "timeoutInMinutes": 0,
         "task": {
            "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "filename": "npm",
            "arguments": "install bower --allow-root",
            "workingFolder": "",
            "failOnStandardError": "false"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "refName": "run_bower",
         "displayName": "Run bower",
         "timeoutInMinutes": 0,
         "task": {
            "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "filename": "bower",
            "arguments": "install",
            "workingFolder": "src/{{Project}}",
            "failOnStandardError": "false"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "refName": "dotnet_restore",
         "displayName": "Run dotnet restore",
         "timeoutInMinutes": 0,
         "task": {
            "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "filename": "dotnet",
            "arguments": "restore --no-cache",
            "workingFolder": "",
            "failOnStandardError": "false"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "refName": "run_tests",
         "displayName": "Run Tests",
         "timeoutInMinutes": 0,
         "task": {
            "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "filename": "dotnet",
            "arguments": "test -l trx",
            "workingFolder": "src/{{Project}}.Tests",
            "failOnStandardError": "false"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": true,
         "refName": "publish_tests",
         "displayName": "Publish Test Results",
         "timeoutInMinutes": 0,
         "task": {
            "id": "0b0f01ed-7dde-43ff-9cbb-e48954daf9b1",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "testRunner": "VSTest",
            "testResultsFiles": "**/*.trx",
            "mergeTestResults": "false",
            "testRunTitle": "Unit",
            "platform": "$(BuildPlatform)",
            "configuration": "$(BuildConfiguration)",
            "publishRunAttachments": "false"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "refName": "dotnet_publish",
         "displayName": "Run dotnet publish",
         "timeoutInMinutes": 0,
         "task": {
            "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "filename": "dotnet",
            "arguments": "publish -c $(BuildConfiguration) -o $(Build.StagingDirectory)/pub",
            "workingFolder": "src/{{Project}}",
            "failOnStandardError": "false"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "refName": "copy_xml",
         "displayName": "Copy parameters.xml to publish folder",
         "timeoutInMinutes": 0,
         "task": {
            "id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "SourceFolder": "templates/",
            "Contents": "**/parameters.xml",
            "TargetFolder": "$(Build.StagingDirectory)/pub",
            "CleanTargetFolder": "false",
            "OverWrite": "false"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "refName": "archive_files",
         "displayName": "Archive files ",
         "timeoutInMinutes": 0,
         "task": {
            "id": "d8b84976-e99a-4b86-b885-4849694435b0",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "rootFolder": "$(Build.StagingDirectory)/pub",
            "includeRootFolder": "false",
            "archiveType": "default",
            "tarCompression": "gz",
            "archiveFile": "website.zip",
            "replaceExistingArchive": "true"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "refName": "copy_files",
         "displayName": "Copy Files",
         "timeoutInMinutes": 0,
         "task": {
            "id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "SourceFolder": "",
            "Contents": "**/*.zip\ntemplates/*.*",
            "TargetFolder": "$(Build.StagingDirectory)/drop",
            "CleanTargetFolder": "false",
            "OverWrite": "false"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "refName": "publish_artifacts",
         "displayName": "Publish Artifact: drop",
         "timeoutInMinutes": 0,
         "task": {
            "id": "2ff763a7-ce83-4e1f-bc89-0ae63477cebe",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "PathtoPublish": "$(Build.StagingDirectory)/drop",
            "ArtifactName": "drop",
            "ArtifactType": "Container",
            "TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)"
         }
      }
   ],
   "triggers": [{
      "branchFilters": [
         "+refs/heads/master"
      ],
      "pathFilters": [],
      "batchChanges": false,
      "maxConcurrentBuildsPerBranch": 1,
      "triggerType": "continuousIntegration"
   }],
   "variables": {
      "system.debug": {
         "value": "false",
         "allowOverride": true
      },
      "BuildConfiguration": {
         "value": "release",
         "allowOverride": true
      },
      "BuildPlatform": {
         "value": "any cpu",
         "allowOverride": true
      },
      "DOTNET_SKIP_FIRST_TIME_EXPERIENCE": {
         "value": "true",
         "allowOverride": false
      },
      "NUGET_XMLDOC_MODE": {
         "value": "skip",
         "allowOverride": false
      }
   },
   "repository": {
      "properties": {
         "labelSources": "0",
         "reportBuildStatus": "true"
      },
      "type": "TfsGit",
      "name": "{{Project}}",
      "url": "{{TFS}}/_git/{{Project}}",
      "defaultBranch": "refs/heads/master",
      "clean": "false",
      "checkoutSubmodules": false
   }
}