Skip to content

Commit

Permalink
Fix manifest collision in pipeline. (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfs authored Feb 2, 2022
1 parent f635544 commit a57c058
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 11 deletions.
50 changes: 41 additions & 9 deletions Pipelines/core-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Azure Pipelines
# https://aka.ms/yaml
variables:
- name: AsaClientName
value: ASA_Cli
- name: AsaLibName
value: ASA_Lib

name: ASA_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.r)
trigger:
batch: true
branches:
include:
- release/v2.*
exclude:
- release/v2.0
- release/v2.3
paths:
include:
- Cli
Expand Down Expand Up @@ -62,12 +65,12 @@ stages:
parameters:
jobName: 'pack_lib'
projectPath: 'Lib/Lib.csproj'
projectName: 'ASA_Lib'
projectName: '${{ variables.AsaLibName }}'
- template: templates/nuget-build-job.yml
parameters:
jobName: 'pack_cli'
projectPath: 'Cli/Cli.csproj'
projectName: 'ASA_CLI'
projectName: '${{ variables.AsaClientName }}'

- stage: Release
dependsOn:
Expand Down Expand Up @@ -254,10 +257,37 @@ stages:
MaxConcurrency: '50'
MaxRetryAttempts: '5'
- task: EsrpCodeSigning@1
displayName: Code Sign Nuget Packages
displayName: Code Sign Nuget Package - CLI
inputs:
ConnectedServiceName: 'CodeSignforATSAN'
FolderPath: '$(Build.BinariesDirectory)'
FolderPath: '$(Build.BinariesDirectory)/${{ variables.AsaClientName }}'
Pattern: '*.nupkg, *.snupkg'
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetSign",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
- task: EsrpCodeSigning@1
displayName: Code Sign Nuget Package - Lib
inputs:
ConnectedServiceName: 'CodeSignforATSAN'
FolderPath: '$(Build.BinariesDirectory)/${{ variables.AsaLibName }}'
Pattern: '*.nupkg, *.snupkg'
signConfigType: 'inlineSignParams'
inlineOperation: |
Expand Down Expand Up @@ -329,8 +359,10 @@ stages:
inputs:
targetType: 'inline'
script: |
mv $env:BUILD_BINARIESDIRECTORY/*.nupkg $env:BUILD_STAGINGDIRECTORY/
mv $env:BUILD_BINARIESDIRECTORY/*.snupkg $env:BUILD_STAGINGDIRECTORY/
mv $env:BUILD_BINARIESDIRECTORY/${{ variables.AsaClientName }}/*.nupkg $env:BUILD_STAGINGDIRECTORY/
mv $env:BUILD_BINARIESDIRECTORY/${{ variables.AsaLibName }}/*.nupkg $env:BUILD_STAGINGDIRECTORY/
mv $env:BUILD_BINARIESDIRECTORY/${{ variables.AsaClientName }}/*.snupkg $env:BUILD_STAGINGDIRECTORY/
mv $env:BUILD_BINARIESDIRECTORY/${{ variables.AsaLibName }}/*.snupkg $env:BUILD_STAGINGDIRECTORY/
- task: PublishPipelineArtifact@1
displayName: Publish Signed Artifacts to Pipeline
inputs:
Expand Down
4 changes: 2 additions & 2 deletions Pipelines/templates/nuget-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
inputs:
command: 'custom'
custom: 'pack'
arguments: '${{ parameters.projectPath }} -c ${{ parameters.buildConfiguration }} -o Packages ${{ parameters.flags }}'
arguments: '${{ parameters.projectPath }} -c ${{ parameters.buildConfiguration }} -o Packages/${{ parameters.projectName }} ${{ parameters.flags }}'
- task: AntiMalware@3
displayName: Anti-Malware Scan
inputs:
Expand All @@ -72,7 +72,7 @@ jobs:
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'Generation Task'
inputs:
BuildDropPath: 'Packages'
BuildDropPath: 'Packages/${{ parameters.projectName }}'
- task: ArchiveFiles@2
displayName: Archive Packages
inputs:
Expand Down

0 comments on commit a57c058

Please sign in to comment.