Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions eng/pipelines/dotnet-sqlclient-ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ stages:
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
referenceType: ${{ parameters.referenceType }}
isInternalBuild: ${{ parameters.isInternalBuild }}

# Build the Abstractions package, and publish it to the pipeline artifacts
# under the given artifact name.
Expand Down
58 changes: 45 additions & 13 deletions eng/pipelines/jobs/pack-logging-package-ci-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@ parameters:
- detailed
- diagnostic

# The C# project reference type to use when building and packing the packages.
- name: referenceType
type: string
default: Project
values:
# Reference sibling packages as NuGet packages.
- Package
# Reference sibling packages as C# projects.
- Project

# True when building on the internal ADO.Net project.
- name: isInternalBuild
type: boolean
default: false

jobs:

- job: pack_logging_package_job
Expand Down Expand Up @@ -95,20 +110,37 @@ jobs:
parameters:
debug: ${{ parameters.debug }}

# Download the assembly signing key for internal Package-mode builds.
- ${{ if and(eq(parameters.isInternalBuild, true), ne(parameters.referenceType, 'Project')) }}:
- template: /eng/pipelines/common/steps/download-assembly-signing-key.yml@self

# Create the NuGet packages.
- task: DotNetCoreCLI@2
displayName: Create NuGet Package
inputs:
command: pack
packagesToPack: $(project)
configurationToPack: ${{ parameters.buildConfiguration }}
packDirectory: $(dotnetPackagesDir)
verbosityToPack: ${{ parameters.dotnetVerbosity }}
# BuildNumber supplies the revision component of FileVersion
# (Major.Minor.Patch.Revision). Without it, FileVersionBuildNumber
# defaults to 0 and the assembly is stamped Major.Minor.Patch.0,
# inconsistent with the MDS/AKV packages that pass it.
buildProperties: SqlClientPackageVersion=${{ parameters.packageVersion }};BuildNumber=$(Build.BuildNumber)
#
# BuildNumber supplies the revision component of FileVersion
# (Major.Minor.Patch.Revision). Without it, FileVersionBuildNumber
# defaults to 0 and the assembly is stamped Major.Minor.Patch.0,
# inconsistent with the MDS/AKV packages that pass it.
- ${{ if and(eq(parameters.isInternalBuild, true), ne(parameters.referenceType, 'Project')) }}:
- task: DotNetCoreCLI@2
displayName: Create NuGet Package
inputs:
command: pack
packagesToPack: $(project)
configurationToPack: ${{ parameters.buildConfiguration }}
packDirectory: $(dotnetPackagesDir)
verbosityToPack: ${{ parameters.dotnetVerbosity }}
buildProperties: SqlClientPackageVersion=${{ parameters.packageVersion }};BuildNumber=$(Build.BuildNumber);SigningKeyPath=$(driverKeyFile.secureFilePath)

- ${{ else }}:
- task: DotNetCoreCLI@2
displayName: Create NuGet Package
inputs:
command: pack
packagesToPack: $(project)
configurationToPack: ${{ parameters.buildConfiguration }}
packDirectory: $(dotnetPackagesDir)
verbosityToPack: ${{ parameters.dotnetVerbosity }}
buildProperties: SqlClientPackageVersion=${{ parameters.packageVersion }};BuildNumber=$(Build.BuildNumber)

# Publish the NuGet packages as a named pipeline artifact.
- task: PublishPipelineArtifact@1
Expand Down
17 changes: 17 additions & 0 deletions eng/pipelines/stages/build-logging-package-ci-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,21 @@ parameters:
- detailed
- diagnostic

# The C# project reference type to use when building and packing the packages.
- name: referenceType
type: string
default: Project
values:
# Reference sibling packages as NuGet packages.
- Package
# Reference sibling packages as C# projects.
- Project

# True when building on the internal ADO.Net project.
- name: isInternalBuild
type: boolean
default: false

stages:

- stage: build_logging_package_stage
Expand Down Expand Up @@ -90,3 +105,5 @@ stages:
buildConfiguration: ${{ parameters.buildConfiguration }}
debug: ${{ parameters.debug }}
dotnetVerbosity: ${{ parameters.dotnetVerbosity }}
referenceType: ${{ parameters.referenceType }}
isInternalBuild: ${{ parameters.isInternalBuild }}
Loading