|
| 1 | +trigger: none |
| 2 | +pr: none |
| 3 | + |
| 4 | +pool: |
| 5 | + name: '1ES-Hosted-DurableTaskFramework' |
| 6 | + demands: |
| 7 | + - ImageOverride -equals MMS2022TLS |
| 8 | + |
| 9 | +steps: |
| 10 | + |
| 11 | +# Configure all the .NET SDK versions we need |
| 12 | +- task: UseDotNet@2 |
| 13 | + displayName: 'Use the .NET Core 2.1 SDK (required for build signing)' |
| 14 | + inputs: |
| 15 | + packageType: 'sdk' |
| 16 | + version: '2.1.x' |
| 17 | + |
| 18 | +- task: UseDotNet@2 |
| 19 | + displayName: 'Use the .NET Core 3.1 SDK' |
| 20 | + inputs: |
| 21 | + packageType: 'sdk' |
| 22 | + version: '3.1.x' |
| 23 | + |
| 24 | +- task: UseDotNet@2 |
| 25 | + displayName: 'Use the .NET 6 SDK' |
| 26 | + inputs: |
| 27 | + packageType: 'sdk' |
| 28 | + version: '6.0.x' |
| 29 | + |
| 30 | +# Use NuGet |
| 31 | +- task: NuGetToolInstaller@1 |
| 32 | + displayName: 'Use NuGet ' |
| 33 | + |
| 34 | +# dotnet restore |
| 35 | +- task: DotNetCoreCLI@2 |
| 36 | + displayName: 'dotnet restore' |
| 37 | + inputs: |
| 38 | + command: restore |
| 39 | + projects: '**/**/*.csproj' |
| 40 | + feedsToUse: config |
| 41 | + nugetConfigPath: '.nuget/nuget.config' |
| 42 | + |
| 43 | +# Build durable-extension |
| 44 | +- task: VSBuild@1 |
| 45 | + displayName: 'Build Durable Extension' |
| 46 | + inputs: |
| 47 | + solution: '**/WebJobs.Extensions.DurableTask.sln' |
| 48 | + vsVersion: "16.0" |
| 49 | + configuration: Release |
| 50 | + |
| 51 | +# Authenticode sign all the DLLs with the Microsoft certificate. |
| 52 | +- task: EsrpCodeSigning@1 |
| 53 | + inputs: |
| 54 | + ConnectedServiceName: 'ESRP Service' |
| 55 | + FolderPath: 'src/WebJobs.Extensions.DurableTask/bin/Release' |
| 56 | + Pattern: '*DurableTask.dll' |
| 57 | + signConfigType: 'inlineSignParams' |
| 58 | + inlineOperation: | |
| 59 | + [ |
| 60 | + { |
| 61 | + "KeyCode": "CP-230012", |
| 62 | + "OperationCode": "SigntoolSign", |
| 63 | + "Parameters": { |
| 64 | + "OpusName": "Microsoft", |
| 65 | + "OpusInfo": "http://www.microsoft.com", |
| 66 | + "FileDigest": "/fd \"SHA256\"", |
| 67 | + "PageHash": "/NPH", |
| 68 | + "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" |
| 69 | + }, |
| 70 | + "ToolName": "sign", |
| 71 | + "ToolVersion": "1.0" |
| 72 | + }, |
| 73 | + { |
| 74 | + "KeyCode": "CP-230012", |
| 75 | + "OperationCode": "SigntoolVerify", |
| 76 | + "Parameters": {}, |
| 77 | + "ToolName": "sign", |
| 78 | + "ToolVersion": "1.0" |
| 79 | + } |
| 80 | + ] |
| 81 | + SessionTimeout: '60' |
| 82 | + MaxConcurrency: '50' |
| 83 | + MaxRetryAttempts: '5' |
| 84 | + |
| 85 | +# SBOM generator task for additional supply chain protection |
| 86 | +- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 |
| 87 | + displayName: 'Manifest Generator ' |
| 88 | + inputs: |
| 89 | + BuildDropPath: '$(System.DefaultWorkingDirectory)' |
| 90 | + |
| 91 | +# dotnet pack |
| 92 | +# Packaging needs to be a separate step from build. |
| 93 | +# This will automatically pick up the signed DLLs. |
| 94 | +- task: DotNetCoreCLI@2 |
| 95 | + displayName: 'dotnet pack WebJobs.Extensions.DurableTask.csproj' |
| 96 | + inputs: |
| 97 | + command: pack |
| 98 | + packagesToPack: 'src/**/WebJobs.Extensions.DurableTask.csproj' |
| 99 | + configuration: Release |
| 100 | + packDirectory: 'azure-functions-durable-extension' |
| 101 | + nobuild: true |
| 102 | + |
| 103 | +# Remove redundant symbol package(s) |
| 104 | +- script: | |
| 105 | + echo *** Searching for .symbols.nupkg files to delete... |
| 106 | + dir /s /b *.symbols.nupkg |
| 107 | + |
| 108 | + echo *** Deleting .symbols.nupkg files... |
| 109 | + del /S /Q *.symbols.nupkg |
| 110 | + |
| 111 | + echo *** Listing remaining packages |
| 112 | + dir /s /b *.nupkg |
| 113 | + displayName: 'Remove Redundant Symbols Package(s)' |
| 114 | + continueOnError: true |
| 115 | + |
| 116 | +# Digitally sign all the nuget packages with the Microsoft certificate. |
| 117 | +# This appears to be an in-place signing job, which is convenient. |
| 118 | +- task: EsrpCodeSigning@1 |
| 119 | + inputs: |
| 120 | + ConnectedServiceName: 'ESRP Service' |
| 121 | + FolderPath: '$(System.DefaultWorkingDirectory)' |
| 122 | + Pattern: '*.nupkg' |
| 123 | + signConfigType: 'inlineSignParams' |
| 124 | + inlineOperation: | |
| 125 | + [ |
| 126 | + { |
| 127 | + "KeyCode": "CP-401405", |
| 128 | + "OperationCode": "NuGetSign", |
| 129 | + "Parameters": {}, |
| 130 | + "ToolName": "sign", |
| 131 | + "ToolVersion": "1.0" |
| 132 | + }, |
| 133 | + { |
| 134 | + "KeyCode": "CP-401405", |
| 135 | + "OperationCode": "NuGetVerify", |
| 136 | + "Parameters": {}, |
| 137 | + "ToolName": "sign", |
| 138 | + "ToolVersion": "1.0" |
| 139 | + } |
| 140 | + ] |
| 141 | + SessionTimeout: '60' |
| 142 | + MaxConcurrency: '50' |
| 143 | + MaxRetryAttempts: '5' |
| 144 | + |
| 145 | +# Make the nuget packages available for download in the ADO portal UI |
| 146 | +- publish: '$(System.DefaultWorkingDirectory)/azure-functions-durable-extension' |
| 147 | + displayName: 'Publish nuget packages to Artifacts' |
| 148 | + artifact: PackageOutput |
| 149 | + |
| 150 | +- task: NuGetCommand@2 |
| 151 | + displayName: 'NuGet push' |
| 152 | + inputs: |
| 153 | + command: push |
| 154 | + packagesToPush: 'Microsoft.Azure.WebJobs.Extensions.DurableTask.*.nupkg' |
| 155 | + nuGetFeedType: external |
| 156 | + publishFeedCredentials: 'Connor Credentials MyGet Staging' |
0 commit comments