├── .gitignore ├── LICENSE ├── Patch Build.json ├── Patch Release - Dynamics Only.json ├── Primary Build.json ├── Primary Release - Dynamics + Azure.json ├── Primary Release - Dynamics Only.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/VSWorkspaceState.json 2 | .vs/slnx.sqlite 3 | .vs/dyn365-ce-devops/v15/.suo 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Marc Schweigert 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Patch Build.json: -------------------------------------------------------------------------------- 1 | { 2 | "options": [ 3 | { 4 | "enabled": false, 5 | "definition": { 6 | "id": "5d58cc01-7c75-450c-be18-a388ddb129ec" 7 | }, 8 | "inputs": { 9 | "branchFilters": "[\"+refs/heads/*\"]", 10 | "additionalFields": "{}" 11 | } 12 | }, 13 | { 14 | "enabled": false, 15 | "definition": { 16 | "id": "a9db38f9-9fdc-478c-b0f9-464221e58316" 17 | }, 18 | "inputs": { 19 | "workItemType": "930827", 20 | "assignToRequestor": "true", 21 | "additionalFields": "{}" 22 | } 23 | }, 24 | { 25 | "enabled": false, 26 | "definition": { 27 | "id": "57578776-4c22-4526-aeb0-86b6da17ee9c" 28 | }, 29 | "inputs": {} 30 | } 31 | ], 32 | "variables": { 33 | "system.debug": { 34 | "value": "false", 35 | "allowOverride": true 36 | } 37 | }, 38 | "retentionRules": [ 39 | { 40 | "branches": [ 41 | "+refs/heads/*" 42 | ], 43 | "artifacts": [], 44 | "artifactTypesToDelete": [ 45 | "FilePath", 46 | "SymbolStore" 47 | ], 48 | "daysToKeep": 10, 49 | "minimumToKeep": 1, 50 | "deleteBuildRecord": true, 51 | "deleteTestResults": true 52 | } 53 | ], 54 | "metrics": [ 55 | { 56 | "name": "CurrentBuildsInQueue", 57 | "scope": "refs/heads/master", 58 | "intValue": 0 59 | }, 60 | { 61 | "name": "CurrentBuildsInProgress", 62 | "scope": "refs/heads/master", 63 | "intValue": 0 64 | }, 65 | { 66 | "name": "CurrentBuildsInQueue", 67 | "scope": "refs/heads/master", 68 | "intValue": 0 69 | }, 70 | { 71 | "name": "CurrentBuildsInProgress", 72 | "scope": "refs/heads/master", 73 | "intValue": 0 74 | }, 75 | { 76 | "name": "CanceledBuilds", 77 | "scope": "refs/heads/master", 78 | "intValue": 0, 79 | "date": "2017-11-02T00:00:00.000Z" 80 | }, 81 | { 82 | "name": "FailedBuilds", 83 | "scope": "refs/heads/master", 84 | "intValue": 0, 85 | "date": "2017-11-02T00:00:00.000Z" 86 | }, 87 | { 88 | "name": "PartiallySuccessfulBuilds", 89 | "scope": "refs/heads/master", 90 | "intValue": 0, 91 | "date": "2017-11-02T00:00:00.000Z" 92 | }, 93 | { 94 | "name": "SuccessfulBuilds", 95 | "scope": "refs/heads/master", 96 | "intValue": 4, 97 | "date": "2017-11-02T00:00:00.000Z" 98 | }, 99 | { 100 | "name": "TotalBuilds", 101 | "scope": "refs/heads/master", 102 | "intValue": 4, 103 | "date": "2017-11-02T00:00:00.000Z" 104 | }, 105 | { 106 | "name": "CanceledBuilds", 107 | "scope": "refs/heads/master", 108 | "intValue": 0, 109 | "date": "2017-11-02T00:00:00.000Z" 110 | }, 111 | { 112 | "name": "FailedBuilds", 113 | "scope": "refs/heads/master", 114 | "intValue": 1, 115 | "date": "2017-11-02T00:00:00.000Z" 116 | }, 117 | { 118 | "name": "PartiallySuccessfulBuilds", 119 | "scope": "refs/heads/master", 120 | "intValue": 0, 121 | "date": "2017-11-02T00:00:00.000Z" 122 | }, 123 | { 124 | "name": "SuccessfulBuilds", 125 | "scope": "refs/heads/master", 126 | "intValue": 0, 127 | "date": "2017-11-02T00:00:00.000Z" 128 | }, 129 | { 130 | "name": "TotalBuilds", 131 | "scope": "refs/heads/master", 132 | "intValue": 1, 133 | "date": "2017-11-02T00:00:00.000Z" 134 | } 135 | ], 136 | "_links": { 137 | "self": { 138 | "href": "https://dkdtdevops.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/build/Definitions/4" 139 | }, 140 | "web": { 141 | "href": "https://dkdtdevops.visualstudio.com/_permalink/_build/index?collectionId=d9f3dc16-657a-4720-bce2-9a7f421ec538&projectId=7895651c-7f1a-466c-aa8f-0352510e6c2c&definitionId=4" 142 | }, 143 | "editor": { 144 | "href": "https://dkdtdevops.visualstudio.com/_permalink/_build/definitionEditor?collectionId=d9f3dc16-657a-4720-bce2-9a7f421ec538&projectId=7895651c-7f1a-466c-aa8f-0352510e6c2c&definitionId=4" 145 | } 146 | }, 147 | "buildNumberFormat": "1.0.1$(Rev:.r)", 148 | "jobAuthorizationScope": 1, 149 | "jobTimeoutInMinutes": 60, 150 | "jobCancelTimeoutInMinutes": 5, 151 | "process": { 152 | "phases": [ 153 | { 154 | "dependencies": [], 155 | "steps": [ 156 | { 157 | "environment": {}, 158 | "enabled": true, 159 | "continueOnError": false, 160 | "alwaysRun": false, 161 | "displayName": "MSCRM Pack Solution", 162 | "timeoutInMinutes": 0, 163 | "condition": "succeeded()", 164 | "refName": "MSCRMPackSolution1", 165 | "task": { 166 | "id": "ebec2a90-ce1f-11e6-ae21-c1fb031659ee", 167 | "versionSpec": "8.*", 168 | "definitionType": "task" 169 | }, 170 | "inputs": { 171 | "unpackedFilesFolder": "SolutionPackage/Patch_1cf549bc", 172 | "mappingFile": "SolutionPackage/map.xml", 173 | "packageType": "Unmanaged", 174 | "updateVersion": "true", 175 | "includeVersionInSolutionFile": "false", 176 | "outputPath": "$(build.artifactstagingdirectory)/Patches", 177 | "treatPackWarningsAsErrors": "false" 178 | } 179 | }, 180 | { 181 | "environment": {}, 182 | "enabled": true, 183 | "continueOnError": false, 184 | "alwaysRun": false, 185 | "displayName": "Copy Files to: $(build.artifactstagingdirectory)", 186 | "timeoutInMinutes": 0, 187 | "condition": "succeeded()", 188 | "refName": "CopyFiles1", 189 | "task": { 190 | "id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c", 191 | "versionSpec": "2.*", 192 | "definitionType": "task" 193 | }, 194 | "inputs": { 195 | "SourceFolder": "$(build.sourcesdirectory)", 196 | "Contents": "**\\*.zip", 197 | "TargetFolder": "$(build.artifactstagingdirectory)", 198 | "CleanTargetFolder": "false", 199 | "OverWrite": "false", 200 | "flattenFolders": "false" 201 | } 202 | }, 203 | { 204 | "environment": {}, 205 | "enabled": true, 206 | "continueOnError": false, 207 | "alwaysRun": false, 208 | "displayName": "Publish Artifact: Publish Artifact: drop", 209 | "timeoutInMinutes": 0, 210 | "condition": "succeeded()", 211 | "refName": "PublishBuildArtifacts2", 212 | "task": { 213 | "id": "2ff763a7-ce83-4e1f-bc89-0ae63477cebe", 214 | "versionSpec": "1.*", 215 | "definitionType": "task" 216 | }, 217 | "inputs": { 218 | "PathtoPublish": "$(build.artifactstagingdirectory)", 219 | "ArtifactName": "drop", 220 | "ArtifactType": "Container", 221 | "TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)", 222 | "Parallel": "false", 223 | "ParallelCount": "8" 224 | } 225 | } 226 | ], 227 | "variables": {}, 228 | "name": "Phase 1", 229 | "target": { 230 | "demands": [], 231 | "executionOptions": { 232 | "type": 0 233 | }, 234 | "type": 1 235 | }, 236 | "jobAuthorizationScope": "projectCollection", 237 | "jobCancelTimeoutInMinutes": 1 238 | } 239 | ], 240 | "type": 1 241 | }, 242 | "repository": { 243 | "properties": { 244 | "cleanOptions": "0", 245 | "gitLfsSupport": "false", 246 | "skipSyncSource": "false", 247 | "checkoutNestedSubmodules": "false", 248 | "fetchDepth": "0", 249 | "connectedServiceId": "b16df596-1a9b-45ed-a715-02641c10e9ed" 250 | }, 251 | "id": "https://github.com/devkeydet/CrmAsyncRequestResponseSampleV2", 252 | "type": "Git", 253 | "name": "GitHub devkeydet CrmAsyncRequestResponseSampleV2", 254 | "url": "https://github.com/devkeydet/CrmAsyncRequestResponseSampleV2", 255 | "defaultBranch": "master", 256 | "clean": "false", 257 | "checkoutSubmodules": false 258 | }, 259 | "processParameters": {}, 260 | "quality": 1, 261 | "authoredBy": { 262 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 263 | "displayName": "Marc Schweigert", 264 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 265 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 266 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 267 | }, 268 | "drafts": [], 269 | "queue": { 270 | "id": 4, 271 | "name": "Hosted VS2017", 272 | "pool": { 273 | "id": 4, 274 | "name": "Hosted VS2017", 275 | "isHosted": true 276 | } 277 | }, 278 | "id": 4, 279 | "name": "Patch Build", 280 | "url": "https://dkdtdevops.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/build/Definitions/4", 281 | "uri": "vstfs:///Build/Definition/4", 282 | "path": "\\", 283 | "type": 2, 284 | "queueStatus": 0, 285 | "revision": 7, 286 | "createdDate": "2017-11-02T11:58:44.290Z", 287 | "project": { 288 | "id": "7895651c-7f1a-466c-aa8f-0352510e6c2c", 289 | "name": "MyFirstProject", 290 | "url": "https://dkdtdevops.visualstudio.com/_apis/projects/7895651c-7f1a-466c-aa8f-0352510e6c2c", 291 | "state": "wellFormed", 292 | "revision": 8, 293 | "visibility": 0 294 | } 295 | } -------------------------------------------------------------------------------- /Patch Release - Dynamics Only.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": 2, 3 | "id": 6, 4 | "revision": 31, 5 | "name": "Patch Release - Dynamics Only", 6 | "description": null, 7 | "createdBy": { 8 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 9 | "displayName": "Marc Schweigert", 10 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 11 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 12 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 13 | }, 14 | "createdOn": "2017-11-02T00:23:31.753Z", 15 | "modifiedBy": { 16 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 17 | "displayName": "Marc Schweigert", 18 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 19 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 20 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 21 | }, 22 | "modifiedOn": "2017-11-04T16:46:11.410Z", 23 | "isDeleted": false, 24 | "path": "\\", 25 | "variables": { 26 | "dynConnectionString": { 27 | "value": "AuthType=Office365;Username=$(dynUserName);Url=$(dynUrl);Password=$(dynPassword)" 28 | }, 29 | "dynMgmtApiUrl": { 30 | "value": "https://admin.services.crm.dynamics.com" 31 | }, 32 | "dynUrl": { 33 | "value": "https://$(dynDomain).crm.dynamics.com" 34 | }, 35 | "dynUserName": { 36 | "value": "$(dynUser)@$(dynTenant)" 37 | } 38 | }, 39 | "variableGroups": [], 40 | "environments": [ 41 | { 42 | "id": 6, 43 | "name": "myenvironment", 44 | "rank": 1, 45 | "owner": { 46 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 47 | "displayName": "Marc Schweigert", 48 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 49 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 50 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 51 | }, 52 | "variables": { 53 | "dynDomain": { 54 | "value": "yourdyndomain" 55 | }, 56 | "dynPassword": { 57 | "value": null, 58 | "isSecret": true 59 | }, 60 | "dynTenant": { 61 | "value": "yourtenant.onmicrosoft.com" 62 | }, 63 | "dynUser": { 64 | "value": "youruser" 65 | } 66 | }, 67 | "preDeployApprovals": { 68 | "approvals": [ 69 | { 70 | "rank": 1, 71 | "isAutomated": true, 72 | "isNotificationOn": false, 73 | "id": 16 74 | } 75 | ] 76 | }, 77 | "deployStep": { 78 | "tasks": [], 79 | "id": 17 80 | }, 81 | "postDeployApprovals": { 82 | "approvals": [ 83 | { 84 | "rank": 1, 85 | "isAutomated": true, 86 | "isNotificationOn": false, 87 | "id": 18 88 | } 89 | ] 90 | }, 91 | "deployPhases": [ 92 | { 93 | "deploymentInput": { 94 | "parallelExecution": { 95 | "parallelExecutionType": "none" 96 | }, 97 | "skipArtifactsDownload": false, 98 | "artifactsDownloadInput": { 99 | "downloadInputs": [] 100 | }, 101 | "queueId": 4, 102 | "demands": [], 103 | "enableAccessToken": false, 104 | "timeoutInMinutes": 0, 105 | "jobCancelTimeoutInMinutes": 1, 106 | "condition": "succeeded()", 107 | "overrideInputs": {} 108 | }, 109 | "rank": 1, 110 | "phaseType": 1, 111 | "name": "Agent phase", 112 | "workflowTasks": [ 113 | { 114 | "taskId": "a6eb6b39-f378-4328-b533-d88f36be7a2a", 115 | "version": "8.*", 116 | "name": "Restore from 1.0.0.1 Backup", 117 | "refName": "MSCRMRestoreOnlineInstance2", 118 | "enabled": true, 119 | "alwaysRun": false, 120 | "continueOnError": false, 121 | "timeoutInMinutes": 0, 122 | "definitionType": "task", 123 | "overrideInputs": {}, 124 | "condition": "succeeded()", 125 | "inputs": { 126 | "apiUrl": "$(dynMgmtApiUrl)", 127 | "username": "$(dynUserName)", 128 | "Password": "$(dynPassword)", 129 | "sourceInstanceName": "$(dynDomain)", 130 | "backupLabel": "your-backup-label", 131 | "targetInstanceName": "$(dynDomain)", 132 | "waitForCompletion": "true", 133 | "sleepDuration": "5" 134 | } 135 | }, 136 | { 137 | "taskId": "4455576d-d40a-4234-ad75-3d7ff40ec76e", 138 | "version": "8.*", 139 | "name": "MSCRM Import Solution", 140 | "refName": "MSCRMImportSolution1", 141 | "enabled": true, 142 | "alwaysRun": false, 143 | "continueOnError": false, 144 | "timeoutInMinutes": 0, 145 | "definitionType": "task", 146 | "overrideInputs": {}, 147 | "condition": "succeeded()", 148 | "inputs": { 149 | "crmConnectionString": "$(dynConnectionString)", 150 | "solutionFile": "$(System.DefaultWorkingDirectory)/Patch Build/drop/Patches/AsyncRequestResponseSample_Patch_1cf549bc.zip", 151 | "publishWorkflows": "false", 152 | "overwriteUnmanagedCustomizations": "false", 153 | "skipProductUpdateDependencies": "false", 154 | "convertToManaged": "false", 155 | "holdingSolution": "false", 156 | "override": "false", 157 | "asyncWaitTimeout": "900" 158 | } 159 | }, 160 | { 161 | "taskId": "f64d3db3-f19a-41dd-bdb8-f8f0e60a4bb1", 162 | "version": "8.*", 163 | "name": "MSCRM Publish Customizations", 164 | "refName": "MSCRMPublishCustomizations1", 165 | "enabled": true, 166 | "alwaysRun": false, 167 | "continueOnError": false, 168 | "timeoutInMinutes": 0, 169 | "definitionType": "task", 170 | "overrideInputs": {}, 171 | "condition": "succeeded()", 172 | "inputs": { 173 | "crmConnectionString": "$(dynConnectionString)" 174 | } 175 | }, 176 | { 177 | "taskId": "77fb5553-32fe-471d-8e77-ae540bf7a32c", 178 | "version": "8.*", 179 | "name": "Disable Admin Mode", 180 | "refName": "MSCRMSetOnlineInstanceAdminMode1", 181 | "enabled": true, 182 | "alwaysRun": false, 183 | "continueOnError": false, 184 | "timeoutInMinutes": 0, 185 | "definitionType": "task", 186 | "overrideInputs": {}, 187 | "condition": "succeeded()", 188 | "inputs": { 189 | "apiUrl": "$(dynMgmtApiUrl)", 190 | "username": "$(dynUserName)", 191 | "password": "$(dynPassword)", 192 | "instanceName": "$(dynDomain)", 193 | "enable": "false", 194 | "allowBackgroundOperations": "false", 195 | "notificationText": "" 196 | } 197 | } 198 | ] 199 | } 200 | ], 201 | "environmentOptions": { 202 | "emailNotificationType": "OnlyOnFailure", 203 | "emailRecipients": "release.environment.owner;release.creator", 204 | "skipArtifactsDownload": false, 205 | "timeoutInMinutes": 0, 206 | "enableAccessToken": false, 207 | "publishDeploymentStatus": true 208 | }, 209 | "demands": [], 210 | "conditions": [], 211 | "executionPolicy": { 212 | "concurrencyCount": 0, 213 | "queueDepthCount": 0 214 | }, 215 | "schedules": [], 216 | "retentionPolicy": { 217 | "daysToKeep": 30, 218 | "releasesToKeep": 3, 219 | "retainBuild": true 220 | }, 221 | "processParameters": {}, 222 | "properties": {} 223 | } 224 | ], 225 | "artifacts": [ 226 | { 227 | "sourceId": "7895651c-7f1a-466c-aa8f-0352510e6c2c:4", 228 | "type": "Build", 229 | "alias": "Patch Build", 230 | "definitionReference": { 231 | "artifactSourceDefinitionUrl": { 232 | "id": "https://dkdtdevops.visualstudio.com/_permalink/_build/index?collectionId=d9f3dc16-657a-4720-bce2-9a7f421ec538&projectId=7895651c-7f1a-466c-aa8f-0352510e6c2c&definitionId=4", 233 | "name": "" 234 | }, 235 | "defaultVersionBranch": { 236 | "id": "", 237 | "name": "" 238 | }, 239 | "defaultVersionSpecific": { 240 | "id": "", 241 | "name": "" 242 | }, 243 | "defaultVersionTags": { 244 | "id": "", 245 | "name": "" 246 | }, 247 | "defaultVersionType": { 248 | "id": "latestType", 249 | "name": "Latest" 250 | }, 251 | "definition": { 252 | "id": "4", 253 | "name": "Patch Build" 254 | }, 255 | "project": { 256 | "id": "7895651c-7f1a-466c-aa8f-0352510e6c2c", 257 | "name": "MyFirstProject" 258 | } 259 | }, 260 | "isPrimary": true 261 | } 262 | ], 263 | "triggers": [], 264 | "releaseNameFormat": "Patch Release - Dynamics Only $(Build.BuildNumber)-$(Date:hhmmss)", 265 | "url": "https://dkdtdevops.vsrm.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/Release/definitions/6", 266 | "_links": { 267 | "self": { 268 | "href": "https://dkdtdevops.vsrm.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/Release/definitions/6" 269 | }, 270 | "web": { 271 | "href": "https://dkdtdevops.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_release?definitionId=6" 272 | } 273 | }, 274 | "tags": [], 275 | "properties": { 276 | "DefinitionCreationSource": { 277 | "$type": "System.String", 278 | "$value": "ReleaseNew" 279 | } 280 | } 281 | } -------------------------------------------------------------------------------- /Primary Build.json: -------------------------------------------------------------------------------- 1 | { 2 | "options": [ 3 | { 4 | "enabled": true, 5 | "definition": { 6 | "id": "5d58cc01-7c75-450c-be18-a388ddb129ec" 7 | }, 8 | "inputs": { 9 | "branchFilters": "[\"+refs/heads/*\"]", 10 | "additionalFields": "{}" 11 | } 12 | }, 13 | { 14 | "enabled": false, 15 | "definition": { 16 | "id": "a9db38f9-9fdc-478c-b0f9-464221e58316" 17 | }, 18 | "inputs": { 19 | "workItemType": "930827", 20 | "assignToRequestor": "true", 21 | "additionalFields": "{}" 22 | } 23 | }, 24 | { 25 | "enabled": false, 26 | "definition": { 27 | "id": "57578776-4c22-4526-aeb0-86b6da17ee9c" 28 | }, 29 | "inputs": {} 30 | } 31 | ], 32 | "variables": { 33 | "BuildConfiguration": { 34 | "value": "release", 35 | "allowOverride": true 36 | }, 37 | "BuildPlatform": { 38 | "value": "any cpu", 39 | "allowOverride": true 40 | } 41 | }, 42 | "retentionRules": [ 43 | { 44 | "branches": [ 45 | "+refs/heads/*" 46 | ], 47 | "artifacts": [], 48 | "artifactTypesToDelete": [ 49 | "FilePath", 50 | "SymbolStore" 51 | ], 52 | "daysToKeep": 10, 53 | "minimumToKeep": 1, 54 | "deleteBuildRecord": true, 55 | "deleteTestResults": true 56 | } 57 | ], 58 | "metrics": [ 59 | { 60 | "name": "CurrentBuildsInQueue", 61 | "scope": "refs/heads/master", 62 | "intValue": 0 63 | }, 64 | { 65 | "name": "CurrentBuildsInProgress", 66 | "scope": "refs/heads/master", 67 | "intValue": 0 68 | }, 69 | { 70 | "name": "CurrentBuildsInQueue", 71 | "scope": "refs/heads/issue7", 72 | "intValue": 0 73 | }, 74 | { 75 | "name": "CurrentBuildsInProgress", 76 | "scope": "refs/heads/issue7", 77 | "intValue": 0 78 | }, 79 | { 80 | "name": "CanceledBuilds", 81 | "scope": "refs/heads/master", 82 | "intValue": 0, 83 | "date": "2017-11-27T00:00:00.000Z" 84 | }, 85 | { 86 | "name": "FailedBuilds", 87 | "scope": "refs/heads/master", 88 | "intValue": 1, 89 | "date": "2017-11-27T00:00:00.000Z" 90 | }, 91 | { 92 | "name": "PartiallySuccessfulBuilds", 93 | "scope": "refs/heads/master", 94 | "intValue": 0, 95 | "date": "2017-11-27T00:00:00.000Z" 96 | }, 97 | { 98 | "name": "SuccessfulBuilds", 99 | "scope": "refs/heads/master", 100 | "intValue": 0, 101 | "date": "2017-11-27T00:00:00.000Z" 102 | }, 103 | { 104 | "name": "TotalBuilds", 105 | "scope": "refs/heads/master", 106 | "intValue": 1, 107 | "date": "2017-11-27T00:00:00.000Z" 108 | } 109 | ], 110 | "_links": { 111 | "self": { 112 | "href": "https://dkdtdevops.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/build/Definitions/2" 113 | }, 114 | "web": { 115 | "href": "https://dkdtdevops.visualstudio.com/_permalink/_build/index?collectionId=d9f3dc16-657a-4720-bce2-9a7f421ec538&projectId=7895651c-7f1a-466c-aa8f-0352510e6c2c&definitionId=2" 116 | }, 117 | "editor": { 118 | "href": "https://dkdtdevops.visualstudio.com/_permalink/_build/definitionEditor?collectionId=d9f3dc16-657a-4720-bce2-9a7f421ec538&projectId=7895651c-7f1a-466c-aa8f-0352510e6c2c&definitionId=2" 119 | } 120 | }, 121 | "buildNumberFormat": "1.0.0$(Rev:.r)", 122 | "jobAuthorizationScope": 1, 123 | "jobTimeoutInMinutes": 60, 124 | "jobCancelTimeoutInMinutes": 5, 125 | "process": { 126 | "phases": [ 127 | { 128 | "dependencies": [], 129 | "steps": [ 130 | { 131 | "environment": {}, 132 | "enabled": true, 133 | "continueOnError": false, 134 | "alwaysRun": false, 135 | "displayName": "NuGet restore", 136 | "timeoutInMinutes": 0, 137 | "refName": "NuGetCommand2", 138 | "task": { 139 | "id": "333b11bd-d341-40d9-afcf-b32d5ce6f23b", 140 | "versionSpec": "2.*", 141 | "definitionType": "task" 142 | }, 143 | "inputs": { 144 | "command": "restore", 145 | "solution": "$(Parameters.solution)", 146 | "selectOrConfig": "select", 147 | "feedRestore": "", 148 | "includeNuGetOrg": "true", 149 | "nugetConfigPath": "", 150 | "externalEndpoints": "", 151 | "noCache": "false", 152 | "packagesDirectory": "", 153 | "verbosityRestore": "Detailed", 154 | "searchPatternPush": "$(Build.ArtifactStagingDirectory)/*.nupkg", 155 | "nuGetFeedType": "internal", 156 | "feedPublish": "", 157 | "allowPackageConflicts": "false", 158 | "externalEndpoint": "", 159 | "verbosityPush": "Detailed", 160 | "searchPatternPack": "**/*.csproj", 161 | "configurationToPack": "$(BuildConfiguration)", 162 | "outputDir": "$(Build.ArtifactStagingDirectory)", 163 | "versioningScheme": "off", 164 | "includeReferencedProjects": "false", 165 | "versionEnvVar": "", 166 | "requestedMajorVersion": "1", 167 | "requestedMinorVersion": "0", 168 | "requestedPatchVersion": "0", 169 | "packTimezone": "utc", 170 | "includeSymbols": "false", 171 | "buildProperties": "", 172 | "verbosityPack": "Detailed", 173 | "arguments": "" 174 | } 175 | }, 176 | { 177 | "environment": {}, 178 | "enabled": true, 179 | "continueOnError": false, 180 | "alwaysRun": false, 181 | "displayName": "Rename appSettings.config.template", 182 | "timeoutInMinutes": 0, 183 | "condition": "succeeded()", 184 | "refName": "rename1", 185 | "task": { 186 | "id": "070a44c5-c554-4e46-ab56-4c1c30c5dc5d", 187 | "versionSpec": "0.*", 188 | "definitionType": "task" 189 | }, 190 | "inputs": { 191 | "Command": "rename", 192 | "SourceFile": "$(Build.SourcesDirectory)\\UIAutomationTests\\appSettings.config.template", 193 | "NewName": "appSettings.config" 194 | } 195 | }, 196 | { 197 | "environment": {}, 198 | "enabled": true, 199 | "continueOnError": false, 200 | "alwaysRun": false, 201 | "displayName": "Build solution **\\*.sln", 202 | "timeoutInMinutes": 0, 203 | "refName": "VSBuild3", 204 | "task": { 205 | "id": "71a9a2d3-a98a-4caa-96ab-affca411ecda", 206 | "versionSpec": "1.*", 207 | "definitionType": "task" 208 | }, 209 | "inputs": { 210 | "solution": "$(Parameters.solution)", 211 | "vsVersion": "15.0", 212 | "msbuildArgs": "", 213 | "platform": "$(BuildPlatform)", 214 | "configuration": "$(BuildConfiguration)", 215 | "clean": "false", 216 | "maximumCpuCount": "false", 217 | "restoreNugetPackages": "false", 218 | "msbuildArchitecture": "x86", 219 | "logProjectEvents": "true", 220 | "createLogFile": "false" 221 | } 222 | }, 223 | { 224 | "environment": {}, 225 | "enabled": true, 226 | "continueOnError": false, 227 | "alwaysRun": false, 228 | "displayName": "Run .NET Unit Tests", 229 | "timeoutInMinutes": 0, 230 | "refName": "VSTest4", 231 | "task": { 232 | "id": "ef087383-ee5e-42c7-9a53-ab56c98420f9", 233 | "versionSpec": "2.*", 234 | "definitionType": "task" 235 | }, 236 | "inputs": { 237 | "testSelector": "testAssemblies", 238 | "testAssemblyVer2": "**\\$(BuildConfiguration)\\*AzureFunctionApp.Tests.dll\n**\\$(BuildConfiguration)\\*Plugins.Tests.dll\n!**\\obj\\**", 239 | "testPlan": "", 240 | "testSuite": "", 241 | "testConfiguration": "", 242 | "tcmTestRun": "$(test.RunId)", 243 | "searchFolder": "$(System.DefaultWorkingDirectory)", 244 | "testFiltercriteria": "", 245 | "runOnlyImpactedTests": "False", 246 | "runAllTestsAfterXBuilds": "50", 247 | "uiTests": "false", 248 | "vstestLocationMethod": "version", 249 | "vsTestVersion": "latest", 250 | "vstestLocation": "", 251 | "runSettingsFile": "CodeCoverage.runsettings", 252 | "overrideTestrunParameters": "", 253 | "pathtoCustomTestAdapters": "", 254 | "runInParallel": "False", 255 | "runTestsInIsolation": "False", 256 | "codeCoverageEnabled": "true", 257 | "otherConsoleOptions": "", 258 | "distributionBatchType": "basedOnTestCases", 259 | "batchingBasedOnAgentsOption": "autoBatchSize", 260 | "customBatchSizeValue": "10", 261 | "batchingBasedOnExecutionTimeOption": "autoBatchSize", 262 | "customRunTimePerBatchValue": "60", 263 | "dontDistribute": "False", 264 | "testRunTitle": "", 265 | "platform": "$(BuildPlatform)", 266 | "configuration": "$(BuildConfiguration)", 267 | "publishRunAttachments": "true" 268 | } 269 | }, 270 | { 271 | "environment": {}, 272 | "enabled": true, 273 | "continueOnError": false, 274 | "alwaysRun": false, 275 | "displayName": "Update chutzpah.json for code coverage (workaround...see source code)", 276 | "timeoutInMinutes": 0, 277 | "condition": "succeeded()", 278 | "refName": "RegExMatchReplace1", 279 | "task": { 280 | "id": "86e3367d-c1d2-40a3-ab67-abd1924ce49f", 281 | "versionSpec": "2.*", 282 | "definitionType": "task" 283 | }, 284 | "inputs": { 285 | "PathToFile": "$(Build.SourcesDirectory)\\WebResources\\tests\\chutzpah.json", 286 | "RegEx": "\"CodeCoverageExecutionMode\": \"Manual\"", 287 | "Global": "false", 288 | "IgnoreCase": "false", 289 | "MultiLine": "false", 290 | "ValueToReplace": "\"CodeCoverageExecutionMode\": \"Always\"" 291 | } 292 | }, 293 | { 294 | "environment": {}, 295 | "enabled": true, 296 | "continueOnError": false, 297 | "alwaysRun": false, 298 | "displayName": "Run JavaScript Unit Tests", 299 | "timeoutInMinutes": 0, 300 | "condition": "succeeded()", 301 | "refName": "VSTest1", 302 | "task": { 303 | "id": "ef087383-ee5e-42c7-9a53-ab56c98420f9", 304 | "versionSpec": "2.*", 305 | "definitionType": "task" 306 | }, 307 | "inputs": { 308 | "testSelector": "testAssemblies", 309 | "testAssemblyVer2": "$(Build.SourcesDirectory)\\WebResources\\tests\\*.tests.js", 310 | "testPlan": "", 311 | "testSuite": "", 312 | "testConfiguration": "", 313 | "tcmTestRun": "$(test.RunId)", 314 | "searchFolder": "$(System.DefaultWorkingDirectory)", 315 | "testFiltercriteria": "", 316 | "runOnlyImpactedTests": "False", 317 | "runAllTestsAfterXBuilds": "50", 318 | "uiTests": "false", 319 | "vstestLocationMethod": "version", 320 | "vsTestVersion": "latest", 321 | "vstestLocation": "", 322 | "runSettingsFile": "", 323 | "overrideTestrunParameters": "", 324 | "pathtoCustomTestAdapters": "$(Build.SourcesDirectory)\\packages", 325 | "runInParallel": "False", 326 | "runTestsInIsolation": "False", 327 | "codeCoverageEnabled": "false", 328 | "otherConsoleOptions": "", 329 | "distributionBatchType": "basedOnTestCases", 330 | "batchingBasedOnAgentsOption": "autoBatchSize", 331 | "customBatchSizeValue": "10", 332 | "batchingBasedOnExecutionTimeOption": "autoBatchSize", 333 | "customRunTimePerBatchValue": "60", 334 | "dontDistribute": "False", 335 | "testRunTitle": "", 336 | "platform": "", 337 | "configuration": "", 338 | "publishRunAttachments": "true" 339 | } 340 | }, 341 | { 342 | "environment": {}, 343 | "enabled": true, 344 | "continueOnError": false, 345 | "alwaysRun": false, 346 | "displayName": "Publish code coverage from JavaScript Unit Tests", 347 | "timeoutInMinutes": 0, 348 | "condition": "succeeded()", 349 | "refName": "PublishCodeCoverageResults1", 350 | "task": { 351 | "id": "2a7ebc54-c13e-490e-81a5-d7561ab7cd97", 352 | "versionSpec": "1.*", 353 | "definitionType": "task" 354 | }, 355 | "inputs": { 356 | "codeCoverageTool": "JaCoCo", 357 | "summaryFileLocation": "$(System.DefaultWorkingDirectory)\\TestResults\\chutzpah-jacoco.xml ", 358 | "reportDirectory": "", 359 | "additionalCodeCoverageFiles": "", 360 | "failIfCoverageEmpty": "true" 361 | } 362 | }, 363 | { 364 | "environment": {}, 365 | "enabled": true, 366 | "continueOnError": false, 367 | "alwaysRun": false, 368 | "displayName": "npm install", 369 | "timeoutInMinutes": 0, 370 | "condition": "succeeded()", 371 | "refName": "Npm1", 372 | "task": { 373 | "id": "fe47e961-9fa8-4106-8639-368c022d43ad", 374 | "versionSpec": "1.*", 375 | "definitionType": "task" 376 | }, 377 | "inputs": { 378 | "command": "install", 379 | "workingDir": "$(Build.SourcesDirectory)\\WebResources", 380 | "verbose": "false", 381 | "customCommand": "", 382 | "customRegistry": "useNpmrc", 383 | "customFeed": "", 384 | "customEndpoint": "", 385 | "publishRegistry": "useExternalRegistry", 386 | "publishFeed": "", 387 | "publishEndpoint": "" 388 | } 389 | }, 390 | { 391 | "environment": {}, 392 | "enabled": true, 393 | "continueOnError": false, 394 | "alwaysRun": false, 395 | "displayName": "gulp uglify (minify javascript)", 396 | "timeoutInMinutes": 0, 397 | "condition": "succeeded()", 398 | "refName": "Gulp2", 399 | "task": { 400 | "id": "b82cfbe4-34f9-40f5-889e-c8842ca9dd9d", 401 | "versionSpec": "0.*", 402 | "definitionType": "task" 403 | }, 404 | "inputs": { 405 | "gulpFile": "$(Build.SourcesDirectory)\\WebResources\\gulpfile.js", 406 | "targets": "uglify", 407 | "arguments": "", 408 | "cwd": "", 409 | "gulpjs": "node_modules/gulp/bin/gulp.js", 410 | "publishJUnitResults": "false", 411 | "testResultsFiles": "**/TEST-*.xml", 412 | "testRunTitle": "", 413 | "enableCodeCoverage": "false", 414 | "testFramework": "Mocha", 415 | "srcFiles": "", 416 | "testFiles": "test/*.js" 417 | } 418 | }, 419 | { 420 | "environment": {}, 421 | "enabled": true, 422 | "continueOnError": false, 423 | "alwaysRun": false, 424 | "displayName": "Replace js with minifiedjs", 425 | "timeoutInMinutes": 0, 426 | "condition": "succeeded()", 427 | "refName": "CopyFiles3", 428 | "task": { 429 | "id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c", 430 | "versionSpec": "2.*", 431 | "definitionType": "task" 432 | }, 433 | "inputs": { 434 | "SourceFolder": "$(Build.SourcesDirectory)\\WebResources\\minifiedjs", 435 | "Contents": "**", 436 | "TargetFolder": "$(Build.SourcesDirectory)\\WebResources", 437 | "CleanTargetFolder": "false", 438 | "OverWrite": "true", 439 | "flattenFolders": "false" 440 | } 441 | }, 442 | { 443 | "environment": {}, 444 | "enabled": true, 445 | "continueOnError": false, 446 | "alwaysRun": false, 447 | "displayName": "MSCRM Pack Solution", 448 | "timeoutInMinutes": 0, 449 | "condition": "succeeded()", 450 | "refName": "MSCRMPackSolution1", 451 | "task": { 452 | "id": "ebec2a90-ce1f-11e6-ae21-c1fb031659ee", 453 | "versionSpec": "8.*", 454 | "definitionType": "task" 455 | }, 456 | "inputs": { 457 | "unpackedFilesFolder": "SolutionPackage/package", 458 | "mappingFile": "SolutionPackage/map.xml", 459 | "packageType": "Unmanaged", 460 | "updateVersion": "true", 461 | "includeVersionInSolutionFile": "false", 462 | "outputPath": "$(build.artifactstagingdirectory)/DeploymentPackage/bin/Release/PkgFolder", 463 | "treatPackWarningsAsErrors": "false" 464 | } 465 | }, 466 | { 467 | "environment": {}, 468 | "enabled": true, 469 | "continueOnError": false, 470 | "alwaysRun": false, 471 | "displayName": "Zip Sample Data", 472 | "timeoutInMinutes": 0, 473 | "condition": "succeeded()", 474 | "refName": "ArchiveFiles1", 475 | "task": { 476 | "id": "d8b84976-e99a-4b86-b885-4849694435b0", 477 | "versionSpec": "1.*", 478 | "definitionType": "task" 479 | }, 480 | "inputs": { 481 | "rootFolder": "Sample Data", 482 | "includeRootFolder": "false", 483 | "archiveType": "default", 484 | "tarCompression": "gz", 485 | "archiveFile": "$(build.artifactstagingdirectory)/DeploymentPackage/bin/Release/PkgFolder/data.zip", 486 | "replaceExistingArchive": "true" 487 | } 488 | }, 489 | { 490 | "environment": {}, 491 | "enabled": false, 492 | "continueOnError": true, 493 | "alwaysRun": false, 494 | "displayName": "Publish symbols path: ", 495 | "timeoutInMinutes": 0, 496 | "refName": "PublishSymbols5", 497 | "task": { 498 | "id": "0675668a-7bba-4ccb-901d-5ad6554ca653", 499 | "versionSpec": "1.*", 500 | "definitionType": "task" 501 | }, 502 | "inputs": { 503 | "SymbolsPath": "", 504 | "SearchPattern": "**\\bin\\**\\*.pdb", 505 | "SymbolsFolder": "", 506 | "SkipIndexing": "false", 507 | "TreatNotIndexedAsWarning": "false", 508 | "SymbolsMaximumWaitTime": "", 509 | "SymbolsProduct": "", 510 | "SymbolsVersion": "", 511 | "SymbolsArtifactName": "Symbols_$(BuildConfiguration)" 512 | } 513 | }, 514 | { 515 | "environment": {}, 516 | "enabled": true, 517 | "continueOnError": false, 518 | "alwaysRun": false, 519 | "displayName": "Copy Files to: $(build.artifactstagingdirectory)", 520 | "timeoutInMinutes": 0, 521 | "refName": "CopyFiles6", 522 | "task": { 523 | "id": "5bfb729a-a7c8-4a78-a7c3-8d717bb7c13c", 524 | "versionSpec": "2.*", 525 | "definitionType": "task" 526 | }, 527 | "inputs": { 528 | "SourceFolder": "$(build.sourcesdirectory)", 529 | "Contents": "**\\bin\\$(BuildConfiguration)\\**", 530 | "TargetFolder": "$(build.artifactstagingdirectory)", 531 | "CleanTargetFolder": "false", 532 | "OverWrite": "false", 533 | "flattenFolders": "false" 534 | } 535 | }, 536 | { 537 | "environment": {}, 538 | "enabled": true, 539 | "continueOnError": false, 540 | "alwaysRun": false, 541 | "displayName": "Publish Artifact: drop", 542 | "timeoutInMinutes": 0, 543 | "refName": "PublishBuildArtifacts7", 544 | "task": { 545 | "id": "2ff763a7-ce83-4e1f-bc89-0ae63477cebe", 546 | "versionSpec": "1.*", 547 | "definitionType": "task" 548 | }, 549 | "inputs": { 550 | "PathtoPublish": "$(build.artifactstagingdirectory)", 551 | "ArtifactName": "drop", 552 | "ArtifactType": "Container", 553 | "TargetPath": "\\\\my\\share\\$(Build.DefinitionName)\\$(Build.BuildNumber)", 554 | "Parallel": "false", 555 | "ParallelCount": "8" 556 | } 557 | } 558 | ], 559 | "variables": {}, 560 | "name": "Phase 1", 561 | "target": { 562 | "demands": [], 563 | "executionOptions": { 564 | "type": 0 565 | }, 566 | "allowScriptsAuthAccessOption": false, 567 | "type": 1 568 | }, 569 | "jobAuthorizationScope": "projectCollection", 570 | "jobCancelTimeoutInMinutes": 1 571 | } 572 | ], 573 | "type": 1 574 | }, 575 | "repository": { 576 | "properties": { 577 | "cleanOptions": "0", 578 | "gitLfsSupport": "false", 579 | "skipSyncSource": "false", 580 | "checkoutNestedSubmodules": "false", 581 | "fetchDepth": "0", 582 | "connectedServiceId": "b16df596-1a9b-45ed-a715-02641c10e9ed" 583 | }, 584 | "id": "https://github.com/devkeydet/CrmAsyncRequestResponseSampleV2", 585 | "type": "Git", 586 | "name": "GitHub devkeydet CrmAsyncRequestResponseSampleV2", 587 | "url": "https://github.com/devkeydet/CrmAsyncRequestResponseSampleV2", 588 | "defaultBranch": "master", 589 | "clean": "false", 590 | "checkoutSubmodules": false 591 | }, 592 | "processParameters": { 593 | "inputs": [ 594 | { 595 | "aliases": [], 596 | "options": {}, 597 | "properties": {}, 598 | "name": "solution", 599 | "label": "Solution", 600 | "defaultValue": "**\\*.sln", 601 | "required": true, 602 | "type": "filePath", 603 | "helpMarkDown": "The path to the Visual Studio solution file or NuGet packages.config. Wildcards can be used. For example, `**\\\\*.sln` for all sln files in all sub folders." 604 | } 605 | ] 606 | }, 607 | "quality": 1, 608 | "authoredBy": { 609 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 610 | "displayName": "Marc Schweigert", 611 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 612 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 613 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 614 | }, 615 | "drafts": [], 616 | "queue": { 617 | "id": 4, 618 | "name": "Hosted VS2017", 619 | "pool": { 620 | "id": 4, 621 | "name": "Hosted VS2017", 622 | "isHosted": true 623 | } 624 | }, 625 | "id": 2, 626 | "name": "Primary Build", 627 | "url": "https://dkdtdevops.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/build/Definitions/2", 628 | "uri": "vstfs:///Build/Definition/2", 629 | "path": "\\", 630 | "type": 2, 631 | "queueStatus": 0, 632 | "revision": 26, 633 | "createdDate": "2017-11-27T16:05:25.350Z", 634 | "project": { 635 | "id": "7895651c-7f1a-466c-aa8f-0352510e6c2c", 636 | "name": "MyFirstProject", 637 | "url": "https://dkdtdevops.visualstudio.com/_apis/projects/7895651c-7f1a-466c-aa8f-0352510e6c2c", 638 | "state": "wellFormed", 639 | "revision": 8, 640 | "visibility": 0 641 | } 642 | } -------------------------------------------------------------------------------- /Primary Release - Dynamics + Azure.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": 2, 3 | "id": 2, 4 | "revision": 51, 5 | "name": "Primary Release - Dynamics + Azure", 6 | "description": null, 7 | "createdBy": { 8 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 9 | "displayName": "Marc Schweigert", 10 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 11 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 12 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 13 | }, 14 | "createdOn": "2017-09-29T21:28:12.420Z", 15 | "modifiedBy": { 16 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 17 | "displayName": "Marc Schweigert", 18 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 19 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 20 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 21 | }, 22 | "modifiedOn": "2017-11-01T22:52:22.127Z", 23 | "isDeleted": false, 24 | "path": "\\", 25 | "variables": { 26 | "aadInstanceUrl": { 27 | "value": "https://login.microsoftonline.com/{0}" 28 | }, 29 | "dynBaseLanguage": { 30 | "value": "1033" 31 | }, 32 | "dynConnectionString": { 33 | "value": "AuthType=Office365;Username=$(dynUserName);Url=$(dynUrl);Password=$(dynPassword)" 34 | }, 35 | "dynMgmtApiUrl": { 36 | "value": "https://admin.services.crm.dynamics.com" 37 | }, 38 | "dynUrl": { 39 | "value": "https://$(dynDomain).crm.dynamics.com" 40 | }, 41 | "dynUserName": { 42 | "value": "$(dynUser)@$(dynTenant)" 43 | } 44 | }, 45 | "variableGroups": [], 46 | "environments": [ 47 | { 48 | "id": 2, 49 | "name": "myenvironment", 50 | "rank": 1, 51 | "owner": { 52 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 53 | "displayName": "Marc Schweigert", 54 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 55 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 56 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 57 | }, 58 | "variables": { 59 | "aadAppName": { 60 | "value": "your-aad-app-name-to-register" 61 | }, 62 | "aadTenant": { 63 | "value": "$(dynTenant)" 64 | }, 65 | "azResourceGroup": { 66 | "value": "your-rg" 67 | }, 68 | "azUniqueName": { 69 | "value": "youruniquename" 70 | }, 71 | "dynDomain": { 72 | "value": "yourdyndomain" 73 | }, 74 | "dynFriendlyName": { 75 | "value": "your friendly name" 76 | }, 77 | "dynPassword": { 78 | "value": null, 79 | "isSecret": true 80 | }, 81 | "dynTenant": { 82 | "value": "yourtenant.onmicrosoft.com" 83 | }, 84 | "dynUser": { 85 | "value": "youruser" 86 | } 87 | }, 88 | "preDeployApprovals": { 89 | "approvals": [ 90 | { 91 | "rank": 1, 92 | "isAutomated": true, 93 | "isNotificationOn": false, 94 | "id": 4 95 | } 96 | ] 97 | }, 98 | "deployStep": { 99 | "tasks": [], 100 | "id": 5 101 | }, 102 | "postDeployApprovals": { 103 | "approvals": [ 104 | { 105 | "rank": 1, 106 | "isAutomated": true, 107 | "isNotificationOn": false, 108 | "id": 6 109 | } 110 | ] 111 | }, 112 | "deployPhases": [ 113 | { 114 | "deploymentInput": { 115 | "parallelExecution": { 116 | "parallelExecutionType": "none" 117 | }, 118 | "skipArtifactsDownload": false, 119 | "artifactsDownloadInput": { 120 | "downloadInputs": [] 121 | }, 122 | "queueId": 4, 123 | "demands": [], 124 | "enableAccessToken": false, 125 | "timeoutInMinutes": 0, 126 | "jobCancelTimeoutInMinutes": 1, 127 | "condition": "succeeded()", 128 | "overrideInputs": {} 129 | }, 130 | "rank": 1, 131 | "phaseType": 1, 132 | "name": "Agent phase", 133 | "workflowTasks": [ 134 | { 135 | "taskId": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", 136 | "version": "1.*", 137 | "name": "Install-Module AzureAD", 138 | "refName": "PowerShell1", 139 | "enabled": true, 140 | "alwaysRun": false, 141 | "continueOnError": false, 142 | "timeoutInMinutes": 0, 143 | "definitionType": "task", 144 | "overrideInputs": {}, 145 | "condition": "succeeded()", 146 | "inputs": { 147 | "scriptType": "inlineScript", 148 | "scriptName": "", 149 | "arguments": "", 150 | "workingFolder": "", 151 | "inlineScript": "Install-Module AzureAD -Force -Scope CurrentUser", 152 | "failOnStandardError": "true" 153 | } 154 | }, 155 | { 156 | "taskId": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", 157 | "version": "1.*", 158 | "name": "Download Register Azure AD App Script", 159 | "refName": "PowerShell2", 160 | "enabled": true, 161 | "alwaysRun": false, 162 | "continueOnError": false, 163 | "timeoutInMinutes": 0, 164 | "definitionType": "task", 165 | "overrideInputs": {}, 166 | "condition": "succeeded()", 167 | "inputs": { 168 | "scriptType": "inlineScript", 169 | "scriptName": "", 170 | "arguments": "", 171 | "workingFolder": "$(System.DefaultWorkingDirectory)/Primary Build/drop", 172 | "inlineScript": "$url = \"https://raw.githubusercontent.com/devkeydet/dyn365-ce-mgmt-api-devops-scripts/1.5/RegisterAzureADApp.ps1\"\n$output = \"RegisterAzureADApp.ps1\"\nInvoke-WebRequest -Uri $url -OutFile $output", 173 | "failOnStandardError": "true" 174 | } 175 | }, 176 | { 177 | "taskId": "e213ff0f-5d5c-4791-802d-52ea3e7be1f1", 178 | "version": "1.*", 179 | "name": "Register Azure AD App", 180 | "refName": "PowerShell1", 181 | "enabled": true, 182 | "alwaysRun": false, 183 | "continueOnError": false, 184 | "timeoutInMinutes": 0, 185 | "definitionType": "task", 186 | "overrideInputs": {}, 187 | "condition": "succeeded()", 188 | "inputs": { 189 | "scriptType": "filePath", 190 | "scriptName": "$(System.DefaultWorkingDirectory)/Primary Build/drop/RegisterAzureADApp.ps1", 191 | "arguments": "-DisplayName $(aadAppName) -UserName \"$(dynUserName)\" -Password \"$(dynPassword)\"", 192 | "workingFolder": "", 193 | "inlineScript": "# You can write your powershell scripts inline here. \n# You can also pass predefined and custom variables to this scripts using arguments\n\n Write-Host \"Hello World\"", 194 | "failOnStandardError": "true" 195 | } 196 | }, 197 | { 198 | "taskId": "764581cb-fc00-4969-bb1a-ec39f59b86f7", 199 | "version": "8.*", 200 | "name": "Reset Instance Part I (Delete)", 201 | "refName": "MSCRMDeleteOnlineInstance1", 202 | "enabled": true, 203 | "alwaysRun": false, 204 | "continueOnError": false, 205 | "timeoutInMinutes": 0, 206 | "definitionType": "task", 207 | "overrideInputs": {}, 208 | "condition": "succeeded()", 209 | "inputs": { 210 | "apiUrl": "$(dynMgmtApiUrl)", 211 | "username": "$(dynUserName)", 212 | "Password": "$(dynPassword)", 213 | "instanceName": "$(dynDomain)", 214 | "waitForCompletion": "true", 215 | "sleepDuration": "5" 216 | } 217 | }, 218 | { 219 | "taskId": "75b16512-23b8-49bd-9f31-c56d491207ad", 220 | "version": "8.*", 221 | "name": "Reset Instance Part II (Provision)", 222 | "refName": "MSCRMProvisionOnlineInstance2", 223 | "enabled": true, 224 | "alwaysRun": false, 225 | "continueOnError": false, 226 | "timeoutInMinutes": 0, 227 | "definitionType": "task", 228 | "overrideInputs": {}, 229 | "condition": "succeeded()", 230 | "inputs": { 231 | "apiUrl": "$(dynMgmtApiUrl)", 232 | "username": "$(dynUserName)", 233 | "password": "$(dynPassword)", 234 | "domainName": "$(dynDomain)", 235 | "friendlyName": "$(dynFriendlyName)", 236 | "purpose": "", 237 | "initialUserEmail": "$(dynUserName)", 238 | "instanceType": "Sandbox", 239 | "serviceVersion": "31cafafe-c6b1-4c0a-bb53-73927841bc5c", 240 | "sales": "false", 241 | "customerService": "false", 242 | "fieldService": "false", 243 | "projectService": "false", 244 | "languageId": "$(dynBaseLanguage)", 245 | "currencyCode": "", 246 | "currencyName": "", 247 | "currencyPrecision": "", 248 | "currencySymbol": "", 249 | "securityGroupId": "", 250 | "securityGroupName": "", 251 | "waitForCompletion": "true", 252 | "sleepDuration": "5" 253 | } 254 | }, 255 | { 256 | "taskId": "94a74903-f93f-4075-884f-dc11f34058b4", 257 | "version": "2.*", 258 | "name": "Create Or Update Azure Resource Group", 259 | "refName": "AzureResourceGroupDeployment1", 260 | "enabled": true, 261 | "alwaysRun": false, 262 | "continueOnError": false, 263 | "timeoutInMinutes": 0, 264 | "definitionType": "task", 265 | "overrideInputs": {}, 266 | "condition": "succeeded()", 267 | "inputs": { 268 | "ConnectedServiceName": "53f99e97-5c92-458f-9e70-6b3896c286c8", 269 | "action": "Create Or Update Resource Group", 270 | "resourceGroupName": "$(azResourceGroup)", 271 | "location": "East US", 272 | "templateLocation": "Linked artifact", 273 | "csmFileLink": "", 274 | "csmParametersFileLink": "", 275 | "csmFile": "$(System.DefaultWorkingDirectory)/Primary Build/drop/AzureResources/azuredeploy.json", 276 | "csmParametersFile": "$(System.DefaultWorkingDirectory)/Primary Build/drop/AzureResources/azuredeploy.parameters.json", 277 | "overrideParameters": "-uniqueName $(azUniqueName)", 278 | "deploymentMode": "Incremental", 279 | "enableDeploymentPrerequisites": "None", 280 | "deploymentGroupEndpoint": "", 281 | "project": "", 282 | "deploymentGroupName": "", 283 | "copyAzureVMTags": "true", 284 | "outputVariable": "" 285 | } 286 | }, 287 | { 288 | "taskId": "584bcff2-3353-4f11-872b-6ba01267a972", 289 | "version": "1.*", 290 | "name": "Get Outputs from ARM Template", 291 | "refName": "ARMOutputs1", 292 | "enabled": true, 293 | "alwaysRun": false, 294 | "continueOnError": false, 295 | "timeoutInMinutes": 0, 296 | "definitionType": "task", 297 | "overrideInputs": {}, 298 | "condition": "succeeded()", 299 | "inputs": { 300 | "ConnectedServiceNameSelector": "ConnectedServiceNameARM", 301 | "ConnectedServiceNameARM": "53f99e97-5c92-458f-9e70-6b3896c286c8", 302 | "resourceGroupName": "$(azResourceGroup)", 303 | "prefix": "", 304 | "outputNames": "" 305 | } 306 | }, 307 | { 308 | "taskId": "497d490f-eea7-4f2b-ab94-48d9c1acdcb1", 309 | "version": "3.*", 310 | "name": "Deploy Azure Function App ", 311 | "refName": "AzureRmWebAppDeployment1", 312 | "enabled": true, 313 | "alwaysRun": false, 314 | "continueOnError": false, 315 | "timeoutInMinutes": 0, 316 | "definitionType": "task", 317 | "overrideInputs": {}, 318 | "condition": "succeeded()", 319 | "inputs": { 320 | "ConnectedServiceName": "53f99e97-5c92-458f-9e70-6b3896c286c8", 321 | "WebAppName": "$(azUniqueName)", 322 | "WebAppKind": "app", 323 | "DeployToSlotFlag": "false", 324 | "ImageSource": "Registry", 325 | "ResourceGroupName": "", 326 | "SlotName": "", 327 | "AzureContainerRegistry": "", 328 | "AzureContainerRegistryLoginServer": "", 329 | "AzureContainerRegistryImage": "", 330 | "AzureContainerRegistryTag": "", 331 | "DockerRepositoryAccess": "public", 332 | "RegistryConnectedServiceName": "", 333 | "PrivateRegistryImage": "", 334 | "PrivateRegistryTag": "", 335 | "DockerNamespace": "", 336 | "DockerRepository": "", 337 | "DockerImageTag": "", 338 | "VirtualApplication": "", 339 | "Package": "$(System.DefaultWorkingDirectory)/Primary Build/drop/AzureFunctionApp/bin/Release/net461", 340 | "BuiltinLinuxPackage": "$(System.DefaultWorkingDirectory)/**/*.zip", 341 | "RuntimeStack": "node|4.4", 342 | "StartupCommand": "", 343 | "WebAppUri": "", 344 | "ScriptType": "", 345 | "InlineScript": ":: You can provide your deployment commands here. One command per line.", 346 | "ScriptPath": "", 347 | "GenerateWebConfig": "false", 348 | "WebConfigParameters": "", 349 | "AppSettings": "", 350 | "TakeAppOfflineFlag": "false", 351 | "UseWebDeploy": "false", 352 | "SetParametersFile": "", 353 | "RemoveAdditionalFilesFlag": "false", 354 | "ExcludeFilesFromAppDataFlag": "false", 355 | "AdditionalArguments": "", 356 | "RenameFilesFlag": "false", 357 | "XmlTransformation": "false", 358 | "XmlVariableSubstitution": "false", 359 | "JSONFiles": "" 360 | } 361 | }, 362 | { 363 | "taskId": "9d2e4cf0-f3bb-11e6-978b-770d284f4f2d", 364 | "version": "1.*", 365 | "name": "Configure Azure Logic App Settings", 366 | "refName": "AzureAppServiceSetAppSettings1", 367 | "enabled": true, 368 | "alwaysRun": false, 369 | "continueOnError": false, 370 | "timeoutInMinutes": 0, 371 | "definitionType": "task", 372 | "overrideInputs": {}, 373 | "condition": "succeeded()", 374 | "inputs": { 375 | "ConnectedServiceName": "53f99e97-5c92-458f-9e70-6b3896c286c8", 376 | "WebAppName": "$(azUniqueName)", 377 | "ResourceGroupName": "$(azResourceGroup)", 378 | "AppSettings": "sbconn='$(NamespaceConnectionString)'\nida:AADInstance='$(aadInstanceUrl)'\nida:Tenant='$(aadTenant)'\nida:ClientId='$(aadClientId)'\nuser='$(dynUserName)'\npassword='$(dynPassword)'\ncrmInstanceUrl='$(dynUrl)'\ncrmWebApiVersion='8.2'" 379 | } 380 | }, 381 | { 382 | "taskId": "f41ba110-0b12-45bc-94c9-67655cb59323", 383 | "version": "8.*", 384 | "name": "Deploy Dynamics 365 Package and Data using Package Deployer", 385 | "refName": "MSCRMPackageDeployer1", 386 | "enabled": true, 387 | "alwaysRun": false, 388 | "continueOnError": false, 389 | "timeoutInMinutes": 0, 390 | "definitionType": "task", 391 | "overrideInputs": {}, 392 | "condition": "succeeded()", 393 | "inputs": { 394 | "crmConnectionString": "$(dynConnectionString)", 395 | "packageName": "DeploymentPackage.dll", 396 | "packageDirectory": "$(System.DefaultWorkingDirectory)/Primary Build/drop/DeploymentPackage/bin/Release" 397 | } 398 | }, 399 | { 400 | "taskId": "a48748ef-a5d6-4af5-a9be-589847132134", 401 | "version": "8.*", 402 | "name": "Update Secure Configuration", 403 | "refName": "MSCRMUpdateSecureConfiguration1", 404 | "enabled": true, 405 | "alwaysRun": false, 406 | "continueOnError": false, 407 | "timeoutInMinutes": 0, 408 | "definitionType": "task", 409 | "overrideInputs": {}, 410 | "condition": "succeeded()", 411 | "inputs": { 412 | "crmConnectionString": "$(dynConnectionString)", 413 | "secureConfiguration": "[\n['0d392320-e6b5-e611-80f3-c4346bac2908','$(NamespaceConnectionString);EntityPath=crmqueue']\n]" 414 | } 415 | }, 416 | { 417 | "taskId": "0c3e661c-d316-443e-9a77-470989da8e29", 418 | "version": "8.*", 419 | "name": "Backup Dynamics 365 Instance", 420 | "refName": "MSCRMBackupOnlineInstance2", 421 | "enabled": true, 422 | "alwaysRun": false, 423 | "continueOnError": false, 424 | "timeoutInMinutes": 0, 425 | "definitionType": "task", 426 | "overrideInputs": {}, 427 | "condition": "succeeded()", 428 | "inputs": { 429 | "apiUrl": "$(dynMgmtApiUrl)", 430 | "username": "$(dynUserName)", 431 | "Password": "$(dynPassword)", 432 | "instanceName": "$(dynDomain)", 433 | "backupLabel": "vsts initiated backup - $(Build.BuildNumber)", 434 | "notes": "", 435 | "isAzureBackup": "false", 436 | "containerName": "", 437 | "storageAccountKey": "", 438 | "storageAccountName": "", 439 | "waitForCompletion": "true", 440 | "sleepDuration": "5" 441 | } 442 | } 443 | ] 444 | } 445 | ], 446 | "environmentOptions": { 447 | "emailNotificationType": "OnlyOnFailure", 448 | "emailRecipients": "release.environment.owner;release.creator", 449 | "skipArtifactsDownload": false, 450 | "timeoutInMinutes": 0, 451 | "enableAccessToken": false, 452 | "publishDeploymentStatus": true 453 | }, 454 | "demands": [], 455 | "conditions": [], 456 | "executionPolicy": { 457 | "concurrencyCount": 0, 458 | "queueDepthCount": 0 459 | }, 460 | "schedules": [], 461 | "retentionPolicy": { 462 | "daysToKeep": 30, 463 | "releasesToKeep": 3, 464 | "retainBuild": true 465 | }, 466 | "processParameters": {}, 467 | "properties": {} 468 | } 469 | ], 470 | "artifacts": [ 471 | { 472 | "sourceId": "7895651c-7f1a-466c-aa8f-0352510e6c2c:2", 473 | "type": "Build", 474 | "alias": "Primary Build", 475 | "definitionReference": { 476 | "artifactSourceDefinitionUrl": { 477 | "id": "https://dkdtdevops.visualstudio.com/_permalink/_build/index?collectionId=d9f3dc16-657a-4720-bce2-9a7f421ec538&projectId=7895651c-7f1a-466c-aa8f-0352510e6c2c&definitionId=2", 478 | "name": "" 479 | }, 480 | "defaultVersionBranch": { 481 | "id": "", 482 | "name": "" 483 | }, 484 | "defaultVersionSpecific": { 485 | "id": "", 486 | "name": "" 487 | }, 488 | "defaultVersionTags": { 489 | "id": "", 490 | "name": "" 491 | }, 492 | "defaultVersionType": { 493 | "id": "latestType", 494 | "name": "Latest" 495 | }, 496 | "definition": { 497 | "id": "2", 498 | "name": "Primary Build" 499 | }, 500 | "project": { 501 | "id": "7895651c-7f1a-466c-aa8f-0352510e6c2c", 502 | "name": "MyFirstProject" 503 | } 504 | }, 505 | "isPrimary": true 506 | } 507 | ], 508 | "triggers": [], 509 | "releaseNameFormat": "Primary Release - Dynamics + Azure $(Build.BuildNumber)-$(Date:hhmmss)", 510 | "url": "https://dkdtdevops.vsrm.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/Release/definitions/2", 511 | "_links": { 512 | "self": { 513 | "href": "https://dkdtdevops.vsrm.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/Release/definitions/2" 514 | }, 515 | "web": { 516 | "href": "https://dkdtdevops.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_release?definitionId=2" 517 | } 518 | }, 519 | "tags": [], 520 | "properties": {} 521 | } -------------------------------------------------------------------------------- /Primary Release - Dynamics Only.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": 2, 3 | "id": 3, 4 | "revision": 24, 5 | "name": "Primary Release - Dynamics Only", 6 | "description": null, 7 | "createdBy": { 8 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 9 | "displayName": "Marc Schweigert", 10 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 11 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 12 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 13 | }, 14 | "createdOn": "2017-10-06T15:54:08.257Z", 15 | "modifiedBy": { 16 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 17 | "displayName": "Marc Schweigert", 18 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 19 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 20 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 21 | }, 22 | "modifiedOn": "2017-11-01T21:21:33.490Z", 23 | "isDeleted": false, 24 | "path": "\\", 25 | "variables": { 26 | "dynBaseLanguage": { 27 | "value": "1033" 28 | }, 29 | "dynConnectionString": { 30 | "value": "AuthType=Office365;Username=$(dynUserName);Url=$(dynUrl);Password=$(dynPassword)" 31 | }, 32 | "dynMgmtApiUrl": { 33 | "value": "https://admin.services.crm.dynamics.com" 34 | }, 35 | "dynUrl": { 36 | "value": "https://$(dynDomain).crm.dynamics.com" 37 | }, 38 | "dynUserName": { 39 | "value": "$(dynUser)@$(dynTenant)" 40 | } 41 | }, 42 | "variableGroups": [], 43 | "environments": [ 44 | { 45 | "id": 3, 46 | "name": "myenvironment", 47 | "rank": 1, 48 | "owner": { 49 | "id": "6582fd44-c7b5-6af6-8054-e8e93761fc9c", 50 | "displayName": "Marc Schweigert", 51 | "uniqueName": "admin@dkdtdevops.onmicrosoft.com", 52 | "url": "https://app.vssps.visualstudio.com/A23c752fb-0c7e-40ce-b5fc-276e6094b415/_apis/Identities/6582fd44-c7b5-6af6-8054-e8e93761fc9c", 53 | "imageUrl": "https://dkdtdevops.visualstudio.com/_api/_common/identityImage?id=6582fd44-c7b5-6af6-8054-e8e93761fc9c" 54 | }, 55 | "variables": { 56 | "dynDomain": { 57 | "value": "yourdyndomain" 58 | }, 59 | "dynFriendlyName": { 60 | "value": "your friendly name" 61 | }, 62 | "dynPassword": { 63 | "value": null, 64 | "isSecret": true 65 | }, 66 | "dynTenant": { 67 | "value": "yourtenant.onmicrosoft.com" 68 | }, 69 | "dynUser": { 70 | "value": "youruser" 71 | } 72 | }, 73 | "preDeployApprovals": { 74 | "approvals": [ 75 | { 76 | "rank": 1, 77 | "isAutomated": true, 78 | "isNotificationOn": false, 79 | "id": 7 80 | } 81 | ] 82 | }, 83 | "deployStep": { 84 | "tasks": [], 85 | "id": 8 86 | }, 87 | "postDeployApprovals": { 88 | "approvals": [ 89 | { 90 | "rank": 1, 91 | "isAutomated": true, 92 | "isNotificationOn": false, 93 | "id": 9 94 | } 95 | ] 96 | }, 97 | "deployPhases": [ 98 | { 99 | "deploymentInput": { 100 | "parallelExecution": { 101 | "parallelExecutionType": "none" 102 | }, 103 | "skipArtifactsDownload": false, 104 | "artifactsDownloadInput": { 105 | "downloadInputs": [] 106 | }, 107 | "queueId": 4, 108 | "demands": [], 109 | "enableAccessToken": false, 110 | "timeoutInMinutes": 0, 111 | "jobCancelTimeoutInMinutes": 1, 112 | "condition": "succeeded()", 113 | "overrideInputs": {} 114 | }, 115 | "rank": 1, 116 | "phaseType": 1, 117 | "name": "Agent phase", 118 | "workflowTasks": [ 119 | { 120 | "taskId": "764581cb-fc00-4969-bb1a-ec39f59b86f7", 121 | "version": "8.*", 122 | "name": "Reset Instance Part I (Delete)", 123 | "refName": "MSCRMDeleteOnlineInstance1", 124 | "enabled": true, 125 | "alwaysRun": false, 126 | "continueOnError": false, 127 | "timeoutInMinutes": 0, 128 | "definitionType": "task", 129 | "overrideInputs": {}, 130 | "condition": "succeeded()", 131 | "inputs": { 132 | "apiUrl": "$(dynMgmtApiUrl)", 133 | "username": "$(dynUserName)", 134 | "Password": "$(dynPassword)", 135 | "instanceName": "$(dynDomain)", 136 | "waitForCompletion": "true", 137 | "sleepDuration": "5" 138 | } 139 | }, 140 | { 141 | "taskId": "75b16512-23b8-49bd-9f31-c56d491207ad", 142 | "version": "8.*", 143 | "name": "Reset Instance Part II (Provision)", 144 | "refName": "MSCRMProvisionOnlineInstance2", 145 | "enabled": true, 146 | "alwaysRun": false, 147 | "continueOnError": false, 148 | "timeoutInMinutes": 0, 149 | "definitionType": "task", 150 | "overrideInputs": {}, 151 | "condition": "succeeded()", 152 | "inputs": { 153 | "apiUrl": "$(dynMgmtApiUrl)", 154 | "username": "$(dynUserName)", 155 | "password": "$(dynPassword)", 156 | "domainName": "$(dynDomain)", 157 | "friendlyName": "$(dynFriendlyName)", 158 | "purpose": "", 159 | "initialUserEmail": "$(dynUserName)", 160 | "instanceType": "Sandbox", 161 | "serviceVersion": "31cafafe-c6b1-4c0a-bb53-73927841bc5c", 162 | "sales": "false", 163 | "customerService": "false", 164 | "fieldService": "false", 165 | "projectService": "false", 166 | "languageId": "$(dynBaseLanguage)", 167 | "currencyCode": "", 168 | "currencyName": "", 169 | "currencyPrecision": "", 170 | "currencySymbol": "", 171 | "securityGroupId": "", 172 | "securityGroupName": "", 173 | "waitForCompletion": "true", 174 | "sleepDuration": "5" 175 | } 176 | }, 177 | { 178 | "taskId": "f41ba110-0b12-45bc-94c9-67655cb59323", 179 | "version": "8.*", 180 | "name": "Deploy Dynamics 365 Package and Data using Package Deployer", 181 | "refName": "MSCRMPackageDeployer1", 182 | "enabled": true, 183 | "alwaysRun": false, 184 | "continueOnError": false, 185 | "timeoutInMinutes": 0, 186 | "definitionType": "task", 187 | "overrideInputs": {}, 188 | "condition": "succeeded()", 189 | "inputs": { 190 | "crmConnectionString": "$(dynConnectionString)", 191 | "packageName": "DeploymentPackage.dll", 192 | "packageDirectory": "$(System.DefaultWorkingDirectory)/Primary Build/drop/DeploymentPackage/bin/Release" 193 | } 194 | }, 195 | { 196 | "taskId": "a48748ef-a5d6-4af5-a9be-589847132134", 197 | "version": "8.*", 198 | "name": "Update Secure Configuration", 199 | "refName": "MSCRMUpdateSecureConfiguration1", 200 | "enabled": true, 201 | "alwaysRun": false, 202 | "continueOnError": false, 203 | "timeoutInMinutes": 0, 204 | "definitionType": "task", 205 | "overrideInputs": {}, 206 | "condition": "succeeded()", 207 | "inputs": { 208 | "crmConnectionString": "$(dynConnectionString)", 209 | "secureConfiguration": "[\n['0d392320-e6b5-e611-80f3-c4346bac2908','some-value']\n]" 210 | } 211 | }, 212 | { 213 | "taskId": "0c3e661c-d316-443e-9a77-470989da8e29", 214 | "version": "8.*", 215 | "name": "Backup Dynamics 365 Instance", 216 | "refName": "MSCRMBackupOnlineInstance1", 217 | "enabled": true, 218 | "alwaysRun": false, 219 | "continueOnError": false, 220 | "timeoutInMinutes": 0, 221 | "definitionType": "task", 222 | "overrideInputs": {}, 223 | "condition": "succeeded()", 224 | "inputs": { 225 | "apiUrl": "$(dynMgmtApiUrl)", 226 | "username": "$(dynUserName)", 227 | "Password": "$(dynPassword)", 228 | "instanceName": "$(dynDomain)", 229 | "backupLabel": "vsts initiated backup - $(Build.BuildNumber)", 230 | "notes": "", 231 | "isAzureBackup": "false", 232 | "containerName": "", 233 | "storageAccountKey": "", 234 | "storageAccountName": "", 235 | "waitForCompletion": "true", 236 | "sleepDuration": "5" 237 | } 238 | } 239 | ] 240 | } 241 | ], 242 | "environmentOptions": { 243 | "emailNotificationType": "OnlyOnFailure", 244 | "emailRecipients": "release.environment.owner;release.creator", 245 | "skipArtifactsDownload": false, 246 | "timeoutInMinutes": 0, 247 | "enableAccessToken": false, 248 | "publishDeploymentStatus": true 249 | }, 250 | "demands": [], 251 | "conditions": [], 252 | "executionPolicy": { 253 | "concurrencyCount": 0, 254 | "queueDepthCount": 0 255 | }, 256 | "schedules": [], 257 | "retentionPolicy": { 258 | "daysToKeep": 30, 259 | "releasesToKeep": 3, 260 | "retainBuild": true 261 | }, 262 | "processParameters": {}, 263 | "properties": {} 264 | } 265 | ], 266 | "artifacts": [ 267 | { 268 | "sourceId": "7895651c-7f1a-466c-aa8f-0352510e6c2c:2", 269 | "type": "Build", 270 | "alias": "Primary Build", 271 | "definitionReference": { 272 | "artifactSourceDefinitionUrl": { 273 | "id": "https://dkdtdevops.visualstudio.com/_permalink/_build/index?collectionId=d9f3dc16-657a-4720-bce2-9a7f421ec538&projectId=7895651c-7f1a-466c-aa8f-0352510e6c2c&definitionId=2", 274 | "name": "" 275 | }, 276 | "defaultVersionBranch": { 277 | "id": "", 278 | "name": "" 279 | }, 280 | "defaultVersionSpecific": { 281 | "id": "", 282 | "name": "" 283 | }, 284 | "defaultVersionTags": { 285 | "id": "", 286 | "name": "" 287 | }, 288 | "defaultVersionType": { 289 | "id": "latestType", 290 | "name": "Latest" 291 | }, 292 | "definition": { 293 | "id": "2", 294 | "name": "Primary Build" 295 | }, 296 | "project": { 297 | "id": "7895651c-7f1a-466c-aa8f-0352510e6c2c", 298 | "name": "MyFirstProject" 299 | } 300 | }, 301 | "isPrimary": true 302 | } 303 | ], 304 | "triggers": [], 305 | "releaseNameFormat": "Primary Release - Dynamics Only $(Build.BuildNumber)-$(Date:hhmmss)", 306 | "url": "https://dkdtdevops.vsrm.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/Release/definitions/3", 307 | "_links": { 308 | "self": { 309 | "href": "https://dkdtdevops.vsrm.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_apis/Release/definitions/3" 310 | }, 311 | "web": { 312 | "href": "https://dkdtdevops.visualstudio.com/7895651c-7f1a-466c-aa8f-0352510e6c2c/_release?definitionId=3" 313 | } 314 | }, 315 | "tags": [], 316 | "properties": {} 317 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Introduction 3 | Please watch the following video to get a high level overview of this project: 4 | 5 | [![Video Introduction](https://img.youtube.com/vi/AorM792M8nY/0.jpg)](https://www.youtube.com/watch?v=AorM792M8nY) 6 | 7 | The project provides reference examples of using [Visual Studio Team Service (VSTS)](https://www.visualstudio.com/team-services/) to build and deploy Dynamics 365 based applications. The reference examples are based on various use cases, including: 8 | 9 | * [Primary Release - Dynamics Only.json](https://github.com/devkeydet/dyn365-ce-devops/blob/master/Primary%20Release%20-%20Dynamics%20Only.json) - Deploying a Dynamics 365 solution package and initial data from source control. 10 | * [Primary Release - Dynamics + Azure.json](https://github.com/devkeydet/dyn365-ce-devops/blob/master/Primary%20Release%20-%20Dynamics%20%2B%20Azure.json) - Builds on [Primary Release - Dynamics Only.json](https://github.com/devkeydet/dyn365-ce-devops/blob/master/Primary%20Release%20-%20Dynamics%20Only.json) and adds deployment of Azure components to the release to demonstrate deploying a release across both. 11 | 12 | The intent of this project is to evolve (over time) to implement additional reference examples based on common and/or requested use cases. Lessons learned from this project have resulted in contributions back to https://github.com/waelHamze/xrm-ci-framework/ and https://github.com/scottdurow/SparkleXrm/wiki/spkl. Please feel free to suggest new scenarios / starter templates or other ideas via the [issues](https://github.com/devkeydet/dyn365-ce-devops/issues) section. 13 | 14 | These release templates point to a sample application that spans Dynamics 365 & Azure. The source code that will be built and deployed by VSTS is available at: 15 | https://github.com/devkeydet/CrmAsyncRequestResponseSampleV2 16 | 17 | The source code in the repository above shows how to source control *both* code and configurations associated with a Dynamics 365 demo/poc/sample. 18 | 19 | The reference build definitions show two different build scenarios: 20 | 21 | * [Primary Build.json](https://github.com/devkeydet/dyn365-ce-devops/blob/master/Primary%20Build.json) - shows how to use VSTS to: 22 | * Build assets from a remote GitHub repository 23 | * This, of course, could be done from a VSTS repository as well depending on whether the source code should be public or private 24 | * Build all the assets from source control into their deployable form 25 | * Reports unit test pass/fail for both .net and javascript code as part of build reporting 26 | * Reports code coverage of unit tests 27 | * Minifies JavaScript using [Gulp](https://gulpjs.com/) 28 | * Solution package zip files 29 | * Packages Dynamics 365 configuration xml files using [Solution Packager](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/use-source-control-solution-files) 30 | * Starter data import zip files 31 | * Zips up xml files produced by the [Configuration Migration](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/manage-configuration-data) tool to setup sample data 32 | * .NET dlls for both Dynamics 365 and an [Azure Function App](https://azure.microsoft.com/en-us/services/functions/) 33 | * etc. 34 | * [Patch Build.json](https://github.com/devkeydet/dyn365-ce-devops/blob/master/Patch%20Build.json) - shows how to use VSTS to: 35 | * Build a simple [patch](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/create-patches-simplify-solution-updates) from source control 36 | 37 | The reference release definitions show how to deploy assets from the build to the target environment(s). Each does the following: 38 | * Primary Release - Dynamics Only.json 39 | * Resets a Dynamics 365 instance by using the [Online Management API for Dynamics 365 Customer Engagement](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/online-management-api) 40 | * Deploys the Dynamics 365 package and sample/intiial data using [Package Deployer](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/deploy-packages-using-package-deployer-windows-powershell) 41 | * Demonstrates how to activate plugins *after* the sample/initial data is imported 42 | * Updates plugin [Secure Configuration](https://us.hitachi-solutions.com/blog/use-secure-vs-unsecure-configuration-plugins/) since it doesn't get stored in the solution package and can vary by environment 43 | * Backs up the Dynamics 365 instance using the [Online Management API for Dynamics 365 Customer Engagement](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/online-management-api) 44 | * Primary Release - Dynamics + Azure.json 45 | * Registers and Azure AD application so the code hosted in Azure has permissions to make web api calls to Dynamics 365 46 | * Resets a Dynamics 365 instance by using the [Online Management API for Dynamics 365 Customer Engagement](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/online-management-api) 47 | * Deploys an [Azure Resource Manager](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview) [template](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview#template-deployment) to provision necessary Azure resources 48 | * Gets configuration data from the Azure deployment for use in latter parts of the deployment process 49 | * Deploys Azure Functions dlls from the build 50 | * Applies configuration settings to the Azure environment 51 | * Deploys the Dynamics 365 package and sample data using [Package Deployer](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/deploy-packages-using-package-deployer-windows-powershell) 52 | * Updates plugin [Secure Configuration](https://us.hitachi-solutions.com/blog/use-secure-vs-unsecure-configuration-plugins/) since it doesn't get stored in the solution package and can vary by environment 53 | * Backs up the Dynamics 365 instance using the [Online Management API for Dynamics 365 Customer Engagement](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/online-management-api) 54 | * Patch Release - Dynamics Only.json 55 | * Restore a Dynamics 365 instances to test applying the patch to, using the [Online Management API for Dynamics 365 Customer Engagement](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/online-management-api) 56 | * Import the patch solution 57 | * Publish the customizations 58 | * Disable Admin Mode using the [Online Management API for Dynamics 365 Customer Engagement](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/online-management-api) 59 | 60 | # UI Automation Testing 61 | The source code of the sample application has a project called [UIAutomationTests](https://github.com/devkeydet/CrmAsyncRequestResponseSampleV2/tree/master/UIAutomationTests), which uses https://github.com/microsoft/easyrepro to demonstrate how perform automated UI testing for Dynamics 365. However, the tests are not yet incorporated into a release as a predeployment quality gate. There is a known issue when using https://github.com/microsoft/easyrepro with the phantomjs driver for headless test execution. Therefore, we cannot run the UI automation tests using the hosted VSTS agent. The hosted agent doesn't have browsers installed. The workaround today is to deploy your own agent. Doing so would allow you to install a browser and use one of the selenium browser drivers. See https://docs.microsoft.com/en-us/vsts/build-release/test/continuous-test-selenium for more details. 62 | 63 | # Getting Started 64 | ## Prereqs 65 | 1. [Primary Build.json](https://github.com/devkeydet/dyn365-ce-devops/blob/master/Primary%20Build.json) requires several VSTS extensions to fully function. Before beginning please install the following extensions. 66 | - [Dynamics 365 Build Tools](https://marketplace.visualstudio.com/items?itemName=WaelHamze.xrm-ci-framework-build-tasks) 67 | - [RegEx Match & Replace](https://marketplace.visualstudio.com/items?itemName=kasunkodagoda.regex-match-replace) 68 | - [File Operations](https://marketplace.visualstudio.com/items?itemName=KirKone.fileoperations) 69 | ## Reference Examples Step by Step 70 | Please watch the following videos to help you understand how to get started: 71 | 72 | *Part I* - This video walks through [Primary Build.json](https://github.com/devkeydet/dyn365-ce-devops/blob/master/Primary%20Build.json) and [Primary Release - Dynamics Only.json](https://github.com/devkeydet/dyn365-ce-devops/blob/master/Primary%20Release%20-%20Dynamics%20Only.json), with a goal of helping you understand how they work and how to import them into your own VSTS project. 73 | 74 | [![Video walkthrough part one](https://img.youtube.com/vi/O_q3cSWAUVI/0.jpg)](https://www.youtube.com/watch?v=O_q3cSWAUVI) 75 | 76 | *Part II* - This video assumes you watched *Part I*. It builds on *Part I*, with a goal of helping you understand how to import and execute [Primary Release - Dynamics + Azure.json](https://github.com/devkeydet/dyn365-ce-devops/blob/master/Primary%20Release%20-%20Dynamics%20%2B%20Azure.json), which includes a more elaborate example, including provisioning, deploying and configuring Azure services and code that work as part of the overall application. 77 | 78 | [![Video walkthrough part two](https://img.youtube.com/vi/hlAEMr4xlCY/0.jpg)](https://www.youtube.com/watch?v=hlAEMr4xlCY) 79 | 80 | ## From Scratch 81 | The previous videos walk you through the reference examples. If you would like a "from scratch" walkthrough of how to start with empty Dynamics 365 & Visual Studio solutions and get to a basic DevOps starting point, please review the following videos: 82 | 83 | *Zero to full source control of a model-driven PowerApp using spkl* 84 | [![Video walkthrough part two](https://img.youtube.com/vi/nutWII2ntVQ/0.jpg)](https://www.youtube.com/watch?v=nutWII2ntVQ) 85 | 86 | *Build and deployment automation of a model-driven PowerApp using VSTS* 87 | [![Video walkthrough part two](https://img.youtube.com/vi/R18HOh2j40k/0.jpg)](https://www.youtube.com/watch?v=R18HOh2j40k) 88 | 89 | NOTE: As of the [spring 2018 release](https://powerapps.microsoft.com/en-us/blog/powerapps-spring-announce/), the core platform in Dynamics 365 (often referred to as XRM) is now available as part of PowerApps. Specifically, [model-driven](https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/model-driven-app-overview) [PowerApps](https://docs.microsoft.com/en-us/powerapps/maker/index) which require the [Common Data Service](https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/data-platform-intro). Said another way, because of this evolution and new branding, the Dynamics 365 CE apps are now built on PowerApps and the Common Data Service. As we evolve this GitHub project, we will work on updating the terminology used in order to be consistent. --------------------------------------------------------------------------------