|
| 1 | +# .NET Desktop |
| 2 | +# Build and run tests for .NET Desktop or Windows classic desktop solutions. |
| 3 | +# Add steps that publish symbols, save build artifacts, and more: |
| 4 | +# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net |
| 5 | + |
| 6 | +trigger: |
| 7 | +- master |
| 8 | + |
| 9 | +pool: |
| 10 | + vmImage: 'windows-latest' |
| 11 | + |
| 12 | +variables: |
| 13 | + solution: '**/*.sln' |
| 14 | + buildPlatform: 'Any CPU' |
| 15 | + buildConfiguration: 'Release' |
| 16 | + |
| 17 | +steps: |
| 18 | +- task: NuGetToolInstaller@1 |
| 19 | + |
| 20 | +- task: NuGetCommand@2 |
| 21 | + inputs: |
| 22 | + restoreSolution: '$(solution)' |
| 23 | + |
| 24 | +- task: VSBuild@1 |
| 25 | + inputs: |
| 26 | + solution: '$(solution)' |
| 27 | + platform: '$(buildPlatform)' |
| 28 | + configuration: '$(buildConfiguration)' |
| 29 | + |
| 30 | +# - task: VSTest@2 |
| 31 | +# inputs: |
| 32 | +# platform: '$(buildPlatform)' |
| 33 | +# configuration: '$(buildConfiguration)' |
| 34 | + |
| 35 | +- task: EsrpCodeSigning@2 |
| 36 | + displayName: ESRP CodeSigning - *.dll |
| 37 | + inputs: |
| 38 | + ConnectedServiceName: 'Code Signing' |
| 39 | + FolderPath: src |
| 40 | + Pattern: '*.dll' |
| 41 | + signConfigType: 'inlineSignParams' |
| 42 | + inlineOperation: | |
| 43 | + [ |
| 44 | + { |
| 45 | + "keyCode": "CP-230012", |
| 46 | + "operationSetCode": "SigntoolSign", |
| 47 | + "parameters": [ |
| 48 | + { |
| 49 | + "parameterName": "OpusName", |
| 50 | + "parameterValue": "Microsoft" |
| 51 | + }, |
| 52 | + { |
| 53 | + "parameterName": "OpusInfo", |
| 54 | + "parameterValue": "http://www.microsoft.com" |
| 55 | + }, |
| 56 | + { |
| 57 | + "parameterName": "PageHash", |
| 58 | + "parameterValue": "/NPH" |
| 59 | + }, |
| 60 | + { |
| 61 | + "parameterName": "FileDigest", |
| 62 | + "parameterValue": "/fd sha256" |
| 63 | + }, |
| 64 | + { |
| 65 | + "parameterName": "TimeStamp", |
| 66 | + "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" |
| 67 | + } |
| 68 | + ], |
| 69 | + "toolName": "signtool.exe", |
| 70 | + "toolVersion": "6.2.9304.0" |
| 71 | + }, |
| 72 | + { |
| 73 | + "keyCode": "CP-230012", |
| 74 | + "operationSetCode": "SigntoolVerify", |
| 75 | + "parameters": [ |
| 76 | + { |
| 77 | + "parameterName": "VerifyAll", |
| 78 | + "parameterValue": "/all" |
| 79 | + } |
| 80 | + ], |
| 81 | + "toolName": "signtool.exe", |
| 82 | + "toolVersion": "6.2.9304.0" |
| 83 | + } |
| 84 | + ] |
| 85 | + SessionTimeout: '60' |
| 86 | + MaxConcurrency: '50' |
| 87 | + MaxRetryAttempts: '5' |
| 88 | + |
| 89 | +- task: DotNetCoreCLI@2 |
| 90 | + name: DotNetCoreCLI3 |
| 91 | + displayName: dotnet pack |
| 92 | + inputs: |
| 93 | + command: pack |
| 94 | + searchPatternPack: Src/**/*.csproj |
| 95 | + outputDir: $(Build.ArtifactStagingDirectory)\pkg |
| 96 | + nobuild: true |
| 97 | + |
| 98 | +- task: EsrpCodeSigning@2 |
| 99 | + displayName: ESRP CodeSigning - *.nupkg |
| 100 | + inputs: |
| 101 | + ConnectedServiceName: 'Code Signing' |
| 102 | + FolderPath: $(Build.ArtifactStagingDirectory)\pkg |
| 103 | + Pattern: '*.nupkg' |
| 104 | + signConfigType: 'inlineSignParams' |
| 105 | + inlineOperation: | |
| 106 | + [ |
| 107 | + { |
| 108 | + "keyCode": "CP-401405", |
| 109 | + "operationSetCode": "NuGetSign", |
| 110 | + "parameters": [ |
| 111 | + { |
| 112 | + "parameterName": "OpusName", |
| 113 | + "parameterValue": "Microsoft" |
| 114 | + }, |
| 115 | + { |
| 116 | + "parameterName": "OpusInfo", |
| 117 | + "parameterValue": "http://www.microsoft.com" |
| 118 | + }, |
| 119 | + { |
| 120 | + "parameterName": "PageHash", |
| 121 | + "parameterValue": "/NPH" |
| 122 | + }, |
| 123 | + { |
| 124 | + "parameterName": "FileDigest", |
| 125 | + "parameterValue": "/fd sha256" |
| 126 | + }, |
| 127 | + { |
| 128 | + "parameterName": "TimeStamp", |
| 129 | + "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" |
| 130 | + } |
| 131 | + ], |
| 132 | + "toolName": "signtool.exe", |
| 133 | + "toolVersion": "6.2.9304.0" |
| 134 | + }, |
| 135 | + { |
| 136 | + "keyCode": "CP-401405", |
| 137 | + "operationSetCode": "NuGetVerify", |
| 138 | + "parameters": [ |
| 139 | + { |
| 140 | + "parameterName": "VerifyAll", |
| 141 | + "parameterValue": "/all" |
| 142 | + } |
| 143 | + ], |
| 144 | + "toolName": "signtool.exe", |
| 145 | + "toolVersion": "6.2.9304.0" |
| 146 | + } |
| 147 | + ] |
| 148 | + SessionTimeout: '60' |
| 149 | + MaxConcurrency: '50' |
| 150 | + MaxRetryAttempts: '5' |
| 151 | + |
| 152 | +- task: PublishPipelineArtifact@1 |
| 153 | + displayName: 'Publish release' |
| 154 | + inputs: |
| 155 | + targetPath: $(Build.ArtifactStagingDirectory) |
| 156 | + artifactName: ElasticScaleClientLibrary |
0 commit comments