{
   "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_dockerfile",
         "displayName": "Copy Dockerfile",
         "timeoutInMinutes": 0,
         "task": {
            "id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c",
            "versionSpec": "*",
            "definitionType": "task"
         },
         "inputs": {
            "SourceFolder": "src/{{Project}}",
            "Contents": "Dockerfile",
            "TargetFolder": "$(Build.StagingDirectory)/pub",
            "CleanTargetFolder": "false",
            "OverWrite": "false"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "displayName": "Build an image",
         "refName": "build_image",
         "timeoutInMinutes": 0,
         "task": {
            "id": "e28912f1-0114-4464-802a-a3a35437fd16",
            "versionSpec": "0.*",
            "definitionType": "task"
         },
         "inputs": {
            "containerregistrytype": "Container Registry",
            "dockerRegistryEndpoint": "{{dockerRegistryEndpoint}}",
            "azureSubscriptionEndpoint": "",
            "azureContainerRegistry": "",
            "action": "Build an image",
            "dockerFile": "$(Build.StagingDirectory)/pub/Dockerfile",
            "buildArguments": "",
            "defaultContext": "false",
            "context": "$(Build.StagingDirectory)/pub",
            "imageName": "{{dockerRegistryId}}/{{ProjectLowerCase}}:$(Build.BuildId)",
            "qualifyImageName": "false",
            "additionalImageTags": "",
            "includeSourceTags": "false",
            "includeLatestTag": "false",
            "imageDigestFile": "",
            "containerName": "",
            "ports": "",
            "volumes": "",
            "envVars": "",
            "workDir": "",
            "entrypoint": "",
            "containerCommand": "",
            "detached": "true",
            "restartPolicy": "no",
            "restartMaxRetries": "",
            "customCommand": "",
            "dockerHostEndpoint": "{{dockerHostEndpoint}}",
            "cwd": "$(Build.StagingDirectory)/pub"
         }
      },
      {
         "enabled": true,
         "continueOnError": false,
         "alwaysRun": false,
         "displayName": "Push an image",
         "refName": "push_image",
         "timeoutInMinutes": 0,
         "task": {
            "id": "e28912f1-0114-4464-802a-a3a35437fd16",
            "versionSpec": "0.*",
            "definitionType": "task"
         },
         "inputs": {
            "containerregistrytype": "Container Registry",
            "dockerRegistryEndpoint": "{{dockerRegistryEndpoint}}",
            "azureSubscriptionEndpoint": "",
            "azureContainerRegistry": "",
            "action": "Push an image",
            "dockerFile": "**/Dockerfile",
            "buildArguments": "",
            "defaultContext": "true",
            "context": "",
            "imageName": "{{dockerRegistryId}}/{{ProjectLowerCase}}:$(Build.BuildId)",
            "qualifyImageName": "false",
            "additionalImageTags": "",
            "includeSourceTags": "false",
            "includeLatestTag": "false",
            "imageDigestFile": "",
            "containerName": "",
            "ports": "",
            "volumes": "",
            "envVars": "",
            "workDir": "",
            "entrypoint": "",
            "containerCommand": "",
            "detached": "true",
            "restartPolicy": "no",
            "restartMaxRetries": "",
            "customCommand": "",
            "dockerHostEndpoint": "{{dockerHostEndpoint}}",
            "cwd": "$(System.DefaultWorkingDirectory)"
         }
      },
      {
         "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": "templates/**",
            "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
   }
}