diff --git a/eng/ci/official-build-isolated.yml b/eng/ci/official-build-isolated.yml new file mode 100644 index 000000000..ad39863a8 --- /dev/null +++ b/eng/ci/official-build-isolated.yml @@ -0,0 +1,35 @@ +variables: + - template: ci/variables/cfs.yml@eng + +trigger: + batch: true + branches: + include: + - main +# CI only, does not trigger on PRs. +pr: none + +resources: + repositories: + - repository: 1es + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release + - repository: eng + type: git + name: engineering + ref: refs/tags/release + +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1es + parameters: + pool: + name: 1es-pool-azfunc + image: 1es-windows-2022 + os: windows + + stages: + - stage: BuildAndSign + dependsOn: [] + jobs: + - template: /eng/templates/build-isolated.yml@self diff --git a/eng/templates/build-isolated.yml b/eng/templates/build-isolated.yml new file mode 100644 index 000000000..ff5008680 --- /dev/null +++ b/eng/templates/build-isolated.yml @@ -0,0 +1,62 @@ +jobs: + - job: Build + + templateContext: + outputs: + - output: pipelineArtifact + path: $(build.artifactStagingDirectory) + artifact: drop + sbomBuildDropPath: $(build.artifactStagingDirectory) + sbomPackageName: 'Durable Functions Extension Isolated SBOM' + + steps: + + - task: UseDotNet@2 + displayName: 'Use the .NET 6 SDK' + inputs: + packageType: 'sdk' + version: '6.0.x' + + # Start by restoring all the .NET Isolated worker extension dependencies. This needs to be its own task. + - task: DotNetCoreCLI@2 + displayName: 'Restore nuget dependencies' + inputs: + command: restore + verbosityRestore: Minimal + feedsToUse: 'config' + nugetConfigPath: 'nuget.config' + projects: 'src/Worker.Extensions.DurableTask/*.csproj' + + # Build just the .NET Isolated worker extension project + - task: DotNetCoreCLI@2 + displayName: 'Build' + inputs: + command: build + arguments: --no-restore -c release -p:FileVersionRevision=$(Build.BuildId) -p:ContinuousIntegrationBuild=true + projects: 'src/Worker.Extensions.DurableTask/*.csproj' + + - template: ci/sign-files.yml@eng + parameters: + displayName: Sign assemblies + folderPath: 'src/Worker.Extensions.DurableTask/bin/Release' + pattern: 'Microsoft.Azure.Functions.Worker.Extensions.DurableTask.dll' + signType: dll + + # Packaging needs to be a separate step from build. + # This will automatically pick up any signed DLLs. + - task: DotNetCoreCLI@2 + displayName: Generate nuget packages + inputs: + command: pack + verbosityPack: Minimal + configuration: Release + nobuild: true + packDirectory: $(build.artifactStagingDirectory) + packagesToPack: 'src/Worker.Extensions.DurableTask/*.csproj' + + - template: ci/sign-files.yml@eng + parameters: + displayName: Sign NugetPackages + folderPath: $(build.artifactStagingDirectory) + pattern: '*.nupkg' + signType: nuget