This commit is contained in:
Lilian Kasem 2024-06-11 16:13:22 -07:00 коммит произвёл GitHub
Родитель bb33b54b03
Коммит 9994356a3c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
22 изменённых файлов: 0 добавлений и 1066 удалений

Просмотреть файл

@ -1,131 +0,0 @@
parameters:
- name: ExtensionDirectory
type: string
default: not-specified
- name: RunExtensionTests
displayName: Run Extension Tests?
type: boolean
default: false
- name: Solution
type: string
default:
jobs:
- job: "Build_And_Test_Windows"
pool:
name: '1ES-Hosted-AzFunc'
demands:
- ImageOverride -equals MMS2022TLS
variables:
- template: extensions-variables.yml
steps:
- template: ../../install-dotnet.yml
- task: DotNetCoreCLI@2
displayName: 'Build projects'
inputs:
command: 'build'
arguments: '-c Release -p:BuildNumber=$(buildNumber) -p:IsLocalBuild=False'
projects: ${{ parameters.ExtensionDirectory }}/src/*.csproj
- ${{ if eq(parameters.RunExtensionTests, true) }}:
- task: DotNetCoreCLI@2
displayName: 'Run tests'
inputs:
command: 'test'
arguments: '-c Release'
projects: |
test/${{ parameters.ExtensionDirectory }}.Tests/**/*Tests.csproj
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: 'ESRP CodeSigning - Authenticode'
condition: eq(variables.isReleaseBuild, true)
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'extensions'
Pattern: Microsoft.Azure.Functions.Worker.Extensions*.dll
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
- task: DeleteFiles@1
displayName: 'Delete CodeSignSummary files'
condition: eq(variables.isReleaseBuild, true)
inputs:
contents: '**\CodeSignSummary-*.md'
- task: DotNetCoreCLI@2
displayName: 'Build packages'
inputs:
command: 'custom'
custom: 'pack'
arguments: '--no-build -c Release -o packages -p:BuildNumber=$(buildNumber) -p:IsLocalBuild=False'
${{if parameters.Solution}}:
projects: |
**\${{ parameters.Solution }}
${{ else }}:
projects: ${{ parameters.ExtensionDirectory }}/src/*.csproj
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: 'ESRP CodeSigning: Nupkg'
condition: eq(variables.isReleaseBuild, true)
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'packages'
Pattern: 'Microsoft.Azure.Functions.Worker*.nupkg'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetSign",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
- task: DeleteFiles@1
displayName: 'Delete CodeSignSummary files'
condition: eq(variables.isReleaseBuild, true)
inputs:
contents: '**\CodeSignSummary-*.md'
- task: ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(System.DefaultWorkingDirectory)/packages'
Verbosity: 'Information'
- publish: $(System.DefaultWorkingDirectory)/packages
artifact: drop

Просмотреть файл

@ -1,10 +0,0 @@
variables:
${{ if and( not(contains(variables['Build.SourceBranch'], '/release/')), not(startsWith(variables['Build.SourceBranch'], 'refs/tags')) ) }}:
buildNumberTemp: $(Build.BuildNumber)
${{ if or( contains(variables['Build.SourceBranch'], '/release/'), startsWith(variables['Build.SourceBranch'], 'refs/tags') ) }}:
isReleaseBuildTemp: true
buildNumber: $[variables.buildNumberTemp]
isReleaseBuild: $[variables.isReleaseBuildTemp]
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Abstractions/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Abstractions/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Abstractions

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.CosmosDB/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.CosmosDB/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.CosmosDB

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.EventGrid/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.EventGrid/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.EventGrid

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.EventHubs/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.EventHubs/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.EventHubs

Просмотреть файл

@ -1,28 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Http.AspNetCore/
- test/extensions/Worker.Extensions.Http.AspNetCore.Tests/
pr:
branches:
include:
- main
- release/*
- feature/enhanced-http
paths:
include:
- extensions/Worker.Extensions.Http.AspNetCore/
- test/extensions/Worker.Extensions.Http.AspNetCore.Tests/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Http.AspNetCore
Solution: AspNetCore.slnf
RunExtensionTests: true

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Http/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Http/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Http

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Kafka/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Kafka/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Kafka

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.RabbitMQ/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.RabbitMQ/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.RabbitMQ

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Rpc/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Rpc/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Rpc

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.SendGrid/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.SendGrid/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.SendGrid

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.ServiceBus/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.ServiceBus/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.ServiceBus

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.SignalRService/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.SignalRService/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.SignalRService

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Storage.Blobs/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Storage.Blobs/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Storage.Blobs

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Storage.Queues/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Storage.Queues/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Storage.Queues

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Storage/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Storage/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Storage

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Tables/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Tables/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Tables

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Timer/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Timer/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Timer

Просмотреть файл

@ -1,24 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Warmup/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- extensions/Worker.Extensions.Warmup/
extends:
template: ../../build/pipelines/templates/extensions-ci.yml
parameters:
ExtensionDirectory: extensions/Worker.Extensions.Warmup

Просмотреть файл

@ -1,203 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- host/src/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- host/src/
stages:
- stage: BuildAndPublishPrelaunchApps
displayName: "Publish pre-launch app for NET 8.0 and NET 7.0"
jobs:
- job: PublishPrelaunchApp
displayName: "Publish Prelaunch apps"
pool:
vmImage: "windows-latest"
steps:
- task: UseDotNet@2
inputs:
useGlobalJson: true
- task: DotNetCoreCLI@2
displayName: "Dotnet publish(NET8) App.csproj"
inputs:
command: "publish"
publishWebProjects: false
zipAfterPublish: false
modifyOutputPath: false
arguments: "-c Release -o $(Build.ArtifactStagingDirectory)/out/8.0 -f net8.0 -p:UseAppHost=false"
projects: "host/src/PrelaunchApp/App.csproj"
- task: DotNetCoreCLI@2
displayName: "Dotnet publish(NET7) App.csproj"
inputs:
command: "publish"
publishWebProjects: false
zipAfterPublish: false
modifyOutputPath: false
arguments: "-c Release -o $(Build.ArtifactStagingDirectory)/out/7.0 -f net7.0 -p:UseAppHost=false"
projects: "host/src/PrelaunchApp/App.csproj"
- task: DotNetCoreCLI@2
displayName: "Dotnet publish(NET6) App.csproj"
inputs:
command: "publish"
publishWebProjects: false
zipAfterPublish: false
modifyOutputPath: false
arguments: "-c Release -o $(Build.ArtifactStagingDirectory)/out/6.0 -f net6.0 -p:UseAppHost=false"
projects: "host/src/PrelaunchApp/App.csproj"
- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(Build.ArtifactStagingDirectory)/out"
artifact: "prelaunch_app_publish_output"
- stage: BuildAndPublish
displayName: "Publish FunctionsNetHost"
jobs:
- job: BuildAndPublishLinux
displayName: "Publish on Linux"
pool:
vmImage: "ubuntu-20.04"
steps:
- task: UseDotNet@2
inputs:
version: "8.x"
- script: |
sudo apt-get install clang zlib1g-dev
- task: DotnetCoreCLI@2
displayName: "Dotnet Publish"
inputs:
command: "publish"
publishWebProjects: false
zipAfterPublish: false
arguments: "-c Release -r linux-x64 -o $(Build.ArtifactStagingDirectory)/output/linux"
workingDirectory: $(Build.SourcesDirectory)/host/src/FunctionsNetHost
- task: CopyFiles@2
displayName: "Copy needed files"
inputs:
SourceFolder: "$(Build.ArtifactStagingDirectory)/output/linux"
# Publish output will include many other files. We only need the FunctionsNetHost, FunctionsNetHost.dbg & libnethost.so
Contents: |
FunctionsNetHost
FunctionsNetHost.dbg
libnethost.so
TargetFolder: "$(Build.ArtifactStagingDirectory)/output/linux_filtered"
- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(Build.ArtifactStagingDirectory)/output/linux_filtered"
artifact: "linux_publish_output"
- job: BuildAndPublishWindows
displayName: "Publish on Windows"
pool:
vmImage: "windows-latest"
steps:
- task: UseDotNet@2
inputs:
version: "8.x"
- task: DotnetCoreCLI@2
displayName: "Dotnet Publish"
inputs:
command: "publish"
publishWebProjects: false
zipAfterPublish: false
arguments: "-c Release -r win-x64 -o $(Build.ArtifactStagingDirectory)/output/windows"
workingDirectory: $(Build.SourcesDirectory)/host/src/FunctionsNetHost
- task: CopyFiles@2
displayName: "Copy needed files"
inputs:
SourceFolder: "$(Build.ArtifactStagingDirectory)/output/windows"
# Publish output will include many other files. We only need FunctionsNetHost.exe, pdb & nethost.dll
Contents: |
FunctionsNetHost.exe
FunctionsNetHost.pdb
nethost.dll
TargetFolder: "$(Build.ArtifactStagingDirectory)/output/windows_filtered"
- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(Build.ArtifactStagingDirectory)/output/windows_filtered"
artifact: "windows_publish_output"
- stage: ConsolidateArtifacts
displayName: "Nuget Publish"
dependsOn:
- BuildAndPublish
- BuildAndPublishPrelaunchApps
jobs:
- job: ConsolidateArtifacts
displayName: "Consolidate Artifacts"
pool:
vmImage: "windows-latest"
steps:
- task: UseDotNet@2
inputs:
version: "8.x"
- task: DownloadPipelineArtifact@2
displayName: "Download Artifacts from Linux build"
inputs:
artifactName: "linux_publish_output"
path: "$(Build.ArtifactStagingDirectory)/linux_output"
- task: DownloadPipelineArtifact@2
displayName: "Download Artifacts from Windows build"
inputs:
artifactName: "windows_publish_output"
path: "$(Build.ArtifactStagingDirectory)/windows_output"
- task: DownloadPipelineArtifact@2
displayName: "Download Artifacts from Prelaunch app publish"
inputs:
artifactName: "prelaunch_app_publish_output"
path: "$(Build.ArtifactStagingDirectory)/prelaunch_app_output"
- task: CopyFiles@2
displayName: "Copy files from linux artifacts to dist dir"
inputs:
SourceFolder: "$(Build.ArtifactStagingDirectory)/linux_output"
TargetFolder: "$(Build.SourcesDirectory)/host/dist/linux"
- task: CopyFiles@2
displayName: "Copy files from Windows artifacts to dist dir"
inputs:
SourceFolder: "$(Build.ArtifactStagingDirectory)/windows_output"
TargetFolder: "$(Build.SourcesDirectory)/host/dist/windows"
- task: CopyFiles@2
displayName: "Copy pre-launch app files to dist dir"
inputs:
SourceFolder: "$(Build.ArtifactStagingDirectory)/prelaunch_app_output"
TargetFolder: "$(Build.SourcesDirectory)/host/dist/portable"
- task: NuGetCommand@2
displayName: "Nuget pack"
inputs:
command: "pack"
packagesToPack: "$(Build.SourcesDirectory)/host/tools/build/Microsoft.Azure.Functions.DotnetIsolatedNativeHost.nuspec"
versioningScheme: "off"
packDestination: "$(Build.ArtifactStagingDirectory)/host/dist/nuget"
basePath: "$(Build.SourcesDirectory)/host/tools/build"
# Publish artifacts.
- publish: $(Build.ArtifactStagingDirectory)/host/dist/nuget
artifact: drop

Просмотреть файл

@ -1,286 +0,0 @@
trigger:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- src/
- sdk/
pr:
branches:
include:
- main
- release/*
- feature/*
paths:
include:
- src/
- test/DotNetWorkerTests
- test/Worker.Extensions.Tests
- test/E2ETests
- test/TestUtility
- sdk/
- samples/FunctionApp
- tools/
- extensions/
jobs:
- job: "Build_And_Test_Windows"
pool:
name: '1ES-Hosted-AzFunc'
demands:
- ImageOverride -equals MMS2022TLS
variables:
${{ if and( not(contains(variables['Build.SourceBranch'], '/release/')), not(startsWith(variables['Build.SourceBranch'], 'refs/tags')) ) }}:
buildNumberTemp: $(Build.BuildNumber)
${{ if or( contains(variables['Build.SourceBranch'], '/release/'), startsWith(variables['Build.SourceBranch'], 'refs/tags') ) }}:
isReleaseBuildTemp: true
buildNumber: $[variables.buildNumberTemp]
isReleaseBuild: $[variables.isReleaseBuildTemp]
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- pwsh: . "tools/start-emulators.ps1" -NoWait
displayName: "Start emulators (NoWait)"
- template: ../build/install-dotnet.yml
- task: DotNetCoreCLI@2
displayName: 'Build projects'
inputs:
command: 'build'
arguments: '-c Release -p:BuildNumber=$(buildNumber) -p:IsLocalBuild=False'
projects: 'DotNetWorker.sln'
- pwsh: |
$useIntegrationTestingCoreTools = $null
if (-not ([bool]::TryParse($env:USECORETOOLSBUILDFROMINTEGRATIONTESTS, [ref] $useIntegrationTestingCoreTools)))
{
throw "UseCoreToolsBuildFromIntegrationTests can only be set to True or False. Current value is set to $env:USECORETOOLSBUILDFROMINTEGRATIONTESTS"
}
./setup-e2e-tests.ps1 -DotnetVersion 'net7' `
-UseCoreToolsBuildFromIntegrationTests:$useIntegrationTestingCoreTools `
-SkipBuildOnPack
displayName: "Setup E2E tests - Net7"
- task: DotNetCoreCLI@2
displayName: 'Run tests - Net7'
inputs:
command: 'test'
arguments: '--no-build -c Release'
projects: |
test/**/*Tests.csproj
- pwsh: |
$useIntegrationTestingCoreTools = $null
if (-not ([bool]::TryParse($env:USECORETOOLSBUILDFROMINTEGRATIONTESTS, [ref] $useIntegrationTestingCoreTools)))
{
throw "UseCoreToolsBuildFromIntegrationTests can only be set to True or False. Current value is set to $env:USECORETOOLSBUILDFROMINTEGRATIONTESTS"
}
./setup-e2e-tests.ps1 -DotnetVersion 'netfx' `
-UseCoreToolsBuildFromIntegrationTests:$useIntegrationTestingCoreTools `
-SkipBuildOnPack
displayName: "Setup E2E tests - NetFramework"
- task: DotNetCoreCLI@2
displayName: 'Run tests - NetFramework'
inputs:
command: 'test'
arguments: '--no-build -c Release'
projects: |
test/**/*Tests.csproj
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: 'Sdk: ESRP CodeSigning - Authenticode'
condition: eq(variables.isReleaseBuild, true)
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'sdk\sdk\bin\Release'
Pattern: Microsoft.Azure.Functions.Worker.Sdk*.dll
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: 'Sdk: ESRP CodeSigning - Authenticode'
condition: eq(variables.isReleaseBuild, true)
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'sdk\Sdk.Analyzers\bin\Release'
Pattern: Microsoft.Azure.Functions.Worker.Sdk.Analyzers.dll
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: 'DotnetWorker: ESRP CodeSigning - Authenticode'
condition: eq(variables.isReleaseBuild, true)
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'src'
Pattern: Microsoft.Azure.Functions.Worker*.dll
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
- task: DeleteFiles@1
displayName: 'Delete CodeSignSummary files'
condition: eq(variables.isReleaseBuild, true)
inputs:
contents: '**\CodeSignSummary-*.md'
- task: DotNetCoreCLI@2
displayName: 'Build packages'
inputs:
command: 'custom'
custom: 'pack'
arguments: '--no-build -c Release -p:PackageOutputPath=$(System.DefaultWorkingDirectory)\packages -p:BuildNumber=$(buildNumber) -p:IsLocalBuild=False'
projects: |
**\DotNetWorker.Core.slnf
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@2
displayName: 'ESRP CodeSigning: Nupkg'
condition: eq(variables.isReleaseBuild, true)
inputs:
ConnectedServiceName: 'ESRP Service'
FolderPath: 'packages'
Pattern: 'Microsoft.Azure.Functions.Worker*.nupkg'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetSign",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-401405",
"OperationCode": "NuGetVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
- task: DeleteFiles@1
displayName: 'Delete CodeSignSummary files'
condition: eq(variables.isReleaseBuild, true)
inputs:
contents: '**\CodeSignSummary-*.md'
- task: ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(System.DefaultWorkingDirectory)/packages'
Verbosity: 'Information'
- publish: $(System.DefaultWorkingDirectory)/packages
artifact: drop
- job: "E2ETests_Ubuntu"
pool:
name: '1ES-Hosted-AzFunc'
demands:
- ImageOverride -equals MMSUbuntu20.04TLS
steps:
- template: ../build/install-dotnet.yml
- task: DotNetCoreCLI@2
displayName: 'Build projects'
inputs:
command: 'build'
arguments: '-c Release'
projects: 'DotNetWorker.sln'
- pwsh: |
$useIntegrationTestingCoreTools = $null
if (-not ([bool]::TryParse($env:USECORETOOLSBUILDFROMINTEGRATIONTESTS, [ref] $useIntegrationTestingCoreTools)))
{
throw "UseCoreToolsBuildFromIntegrationTests can only be set to True or False. Current value is set to $env:USECORETOOLSBUILDFROMINTEGRATIONTESTS"
}
./setup-e2e-tests.ps1 -DotnetVersion 'net7' `
-UseCoreToolsBuildFromIntegrationTests:$useIntegrationTestingCoreTools `
-SkipCosmosDBEmulator `
-SkipBuildOnPack
displayName: "Setup E2E tests"
env:
CORE_TOOLS_URL: $(CORE_TOOLS_URL)
- task: DotNetCoreCLI@2
displayName: 'Run E2E tests'
inputs:
command: 'test'
arguments: '--no-build -c Release --filter "FullyQualifiedName~HttpTrigger"' #only run http tests to avoid emulators on Linux
projects: |
test/**/*Tests.csproj
!test/**/Worker.Extensions.Rpc.Tests.csproj