Skip to content

Commit

Permalink
1 ES migration - first draft (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmrdavid committed Jun 17, 2024
1 parent 213d57d commit 79e342c
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
36 changes: 36 additions & 0 deletions eng/ci/official-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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.yml@self
63 changes: 63 additions & 0 deletions eng/templates/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
jobs:
- job: Build

templateContext:
outputs:
- output: pipelineArtifact
path: $(build.artifactStagingDirectory)
artifact: drop
sbomBuildDropPath: $(System.DefaultWorkingDirectory)
sbomPackageName: 'DurableTask-MSSQL SBOM'

steps:
- task: UseDotNet@2
displayName: 'Use the .NET 6 SDK'
inputs:
packageType: 'sdk'
version: '6.0.x'

# Start by restoring all the dependencies. This needs to be its own task
# from what I can tell.
- task: DotNetCoreCLI@2
displayName: 'Restore nuget dependencies'
inputs:
command: restore
verbosityRestore: Minimal
projects: '**/*.csproj'

# Build the entire solution. This will also build all the tests, which
# isn't strictly necessary...
- task: VSBuild@1
displayName: 'Build'
inputs:
solution: '**/*.sln'
vsVersion: 'latest'
logFileVerbosity: minimal
configuration: Release
msbuildArgs: /p:FileVersionRevision=$(Build.BuildId) /p:ContinuousIntegrationBuild=true

- template: ci/sign-files.yml@eng
parameters:
displayName: Sign assemblies
folderPath: src
pattern: DurableTask.*.dll
signType: dll

# Packaging needs to be a separate step from build.
# This will automatically pick up the signed DLLs.
- task: DotNetCoreCLI@2
displayName: Generate nuget packages
inputs:
command: pack
verbosityPack: Minimal
configuration: Release
nobuild: true
packDirectory: $(build.artifactStagingDirectory)
packagesToPack: 'src/**/*.csproj'

- template: ci/sign-files.yml@eng
parameters:
displayName: Sign NugetPackages
folderPath: $(build.artifactStagingDirectory)
pattern: '*.nupkg'
signType: nuget

0 comments on commit 79e342c

Please sign in to comment.