Skip to content
Merged
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
29 changes: 29 additions & 0 deletions azure-pipelines-encryption-custom-official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
trigger: none

pr: none

variables:
ReleaseArguments: ' --filter "TestCategory!=Quarantine" --verbosity normal '
VmImage: windows-latest # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
BuildConfiguration: Release
Packaging.EnableSBOMSigning: true

stages:
- stage:
displayName: Encryption Custom Release Gates
jobs:
- template: templates/static-tools-encryption-custom.yml
parameters:
BuildConfiguration: '${{ variables.BuildConfiguration }}'
VmImage: '${{ variables.VmImage }}'

- stage:
displayName: Build, Pack and Publish
jobs:
- template: templates/encryption-custom-nuget-pack.yml
parameters:
BuildConfiguration: Release
VmImage: '${{ variables.VmImage }}'
ReleasePackage: true
OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos.Encryption.Custom'
BlobVersion: $(BlobVersion)
77 changes: 0 additions & 77 deletions azure-pipelines-encryption-custom.yml

This file was deleted.

29 changes: 29 additions & 0 deletions azure-pipelines-encryption-official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
trigger: none

pr: none

variables:
ReleaseArguments: ' --filter "TestCategory!=Quarantine" --verbosity normal '
VmImage: windows-latest # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
BuildConfiguration: Release
Packaging.EnableSBOMSigning: true

stages:
- stage:
displayName: Encryption Release Gates
jobs:
- template: templates/static-tools-encryption.yml
parameters:
BuildConfiguration: '${{ variables.BuildConfiguration }}'
VmImage: '${{ variables.VmImage }}'

- stage:
displayName: Build, Pack and Publish
jobs:
- template: templates/encryption-nuget-pack.yml
parameters:
BuildConfiguration: Release
VmImage: '${{ variables.VmImage }}'
ReleasePackage: true
OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos.Encryption'
BlobVersion: $(BlobVersion)
78 changes: 0 additions & 78 deletions azure-pipelines-encryption.yml

This file was deleted.

79 changes: 79 additions & 0 deletions templates/encryption-custom-nuget-pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# File: templates/encryption-nuget-pack.yml

parameters:
- name: BuildConfiguration
type: string
default: ''
- name: Arguments
type: string
default: ''
- name: VmImage
type: string
default: ''
- name: OutputPath
type: string
default: ''
- name: BlobVersion
type: string
default: ''
- name: ReleasePackage
type: boolean
default: false
- name: CleanupFolder
type: boolean
default: false

jobs:
- job: GenerateNugetPackages
displayName: Generate Nuget packages
pool:
name: 'OneES'

steps:
- task: DotNetCoreCLI@2
displayName: Build Microsoft.Azure.Cosmos.Encryption.Custom
inputs:
command: build
configuration: $(BuildConfiguration)
nugetConfigPath: NuGet.config
projects: Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj
arguments: --configuration ${{ parameters.BuildConfiguration }} -p:Optimize=true ${{ parameters.Arguments }}
versioningScheme: OFF

- task: DotNetCoreCLI@2
displayName: 'Create Encryption Custom NuGet Package'
inputs:
command: custom
projects: 'Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj'
custom: pack
arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build ${{ parameters.Arguments }} --no-restore -o "${{ parameters.OutputPath }}"'

- ${{ if eq(parameters.ReleasePackage, true) }}:
- task: DotNetCoreCLI@2
displayName: 'Create Encryption Custom NuGet Symbols Package'
inputs:
command: custom
projects: 'Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj'
custom: pack
arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build --include-symbols /p:SymbolPackageFormat=snupkg ${{ parameters.Arguments }} --no-restore -o "${{ parameters.OutputPath }}"'
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
inputs:
BuildDropPath: '$(Build.ArtifactStagingDirectory)\bin\AnyCPU\$(BuildConfiguration)\Microsoft.Azure.Cosmos.Encryption.Custom'

- ${{ if ne(parameters.BlobVersion, '') }}:
- task: AzureFileCopy@6
displayName: 'Copy Artifacts to Azure SDK Release blob storage'
condition: succeeded()
inputs:
SourcePath: '$(Build.ArtifactStagingDirectory)\bin\AnyCPU\$(BuildConfiguration)\Microsoft.Azure.Cosmos.Encryption.Custom/**'
azureSubscription: azuresdkpartnerdrops
Destination: AzureBlob
storage: azuresdkpartnerdrops
ContainerName: 'drops'
BlobPrefix: 'cosmosdb/csharp/encryption.custom/$(BlobVersion)'
CleanTargetBeforeCopy: ${{ parameters.CleanupFolder }}

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts: Microsoft.Azure.Cosmos.Encryption.Custom'
inputs:
artifactName: Microsoft.Azure.Cosmos.Encryption.Custom
79 changes: 79 additions & 0 deletions templates/encryption-nuget-pack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# File: templates/encryption-nuget-pack.yml

parameters:
- name: BuildConfiguration
type: string
default: ''
- name: Arguments
type: string
default: ''
- name: VmImage
type: string
default: ''
- name: OutputPath
type: string
default: ''
- name: BlobVersion
type: string
default: ''
- name: ReleasePackage
type: boolean
default: false
- name: CleanupFolder
type: boolean
default: false

jobs:
- job: GenerateNugetPackages
displayName: Generate Nuget packages
pool:
name: 'OneES'

steps:
- task: DotNetCoreCLI@2
displayName: Build Microsoft.Azure.Cosmos.Encryption
inputs:
command: build
configuration: $(BuildConfiguration)
nugetConfigPath: NuGet.config
projects: Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj
arguments: --configuration ${{ parameters.BuildConfiguration }} -p:Optimize=true ${{ parameters.Arguments }}
versioningScheme: OFF

- task: DotNetCoreCLI@2
displayName: 'Create Encryption NuGet Package'
inputs:
command: custom
projects: 'Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj'
custom: pack
arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build ${{ parameters.Arguments }} --no-restore -o "${{ parameters.OutputPath }}"'

- ${{ if eq(parameters.ReleasePackage, true) }}:
- task: DotNetCoreCLI@2
displayName: 'Create Encryption NuGet Symbols Package'
inputs:
command: custom
projects: 'Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj'
custom: pack
arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build --include-symbols /p:SymbolPackageFormat=snupkg ${{ parameters.Arguments }} --no-restore -o "${{ parameters.OutputPath }}"'
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
inputs:
BuildDropPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos.Encryption'

- ${{ if ne(parameters.BlobVersion, '') }}:
- task: AzureFileCopy@6
displayName: 'Copy Artifacts to Azure SDK Release blob storage'
condition: succeeded()
inputs:
SourcePath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos.Encryption/**'
azureSubscription: azuresdkpartnerdrops
Destination: AzureBlob
storage: azuresdkpartnerdrops
ContainerName: 'drops'
BlobPrefix: 'cosmosdb/csharp/encryption/$(BlobVersion)'
CleanTargetBeforeCopy: ${{ parameters.CleanupFolder }}

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts: Microsoft.Azure.Cosmos.Encryption'
inputs:
artifactName: Microsoft.Azure.Cosmos.Encryption
Loading
Loading