Skip to content

Commit

Permalink
Adjuting jobs in pack template
Browse files Browse the repository at this point in the history
  • Loading branch information
ealsur committed Jul 7, 2022
1 parent 803b169 commit 9ab745d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 34 deletions.
33 changes: 2 additions & 31 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,6 @@ stages:
BuildConfiguration: Release
Arguments: $(ReleaseArguments)
VmImage: $(VmImage)
GenerateSymbols: true
ReleasePackage: true
OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos'

- job:
dependsOn: GenerateNugetPackages
pool:
vmImage: $(VmImage)

steps:
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
inputs:
BuildDropPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos'

- task: AzureFileCopy@2
displayName: ' Copy Artifacts to Azure SDK Release blob storage'
condition: and(succeeded(),ne(variables['BlobVersion'], ''))
inputs:
SourcePath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos'
azureSubscription: azuresdkpartnerdrops
Destination: AzureBlob
storage: azuresdkpartnerdrops
ContainerName: 'drops'
BlobPrefix: 'cosmosdb/csharp/$(BlobVersion)'

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

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
#
BlobVersion: variables['BlobVersion']
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
BuildConfiguration: Release
Arguments: $(ReleaseArguments)
VmImage: $(VmImage)
GenerateSymbols: false
ReleasePackage: false
OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/Release/Microsoft.Azure.Cosmos'

- template: templates/build-ctl.yml
Expand Down
27 changes: 25 additions & 2 deletions templates/nuget-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ parameters:
VmImage: '' # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
OS: 'Windows'
OutputPath: ''
GenerateSymbols: true
ReleasePackage: false
BlobVersion: ''

jobs:
- job: GenerateNugetPackages
Expand All @@ -33,11 +34,33 @@ jobs:
custom: pack
arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build --no-restore -o "${{ parameters.OutputPath }}"'

- ${{ if eq(parameters.GenerateSymbols, true) }}:
- ${{ if eq(parameters.ReleasePackage, true) }}:
- task: DotNetCoreCLI@2
displayName: 'Create SDK NuGet Symbols Package'
inputs:
command: custom
projects: 'Microsoft.Azure.Cosmos\src\Microsoft.Azure.Cosmos.csproj'
custom: pack
arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build --include-symbols /p:SymbolPackageFormat=snupkg --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'

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

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

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'

0 comments on commit 9ab745d

Please sign in to comment.