From 158df9c9752f730e7c336d3a44fff585f1307d19 Mon Sep 17 00:00:00 2001 From: Brian Mouncer <48774897+BrianMouncer@users.noreply.github.com> Date: Thu, 28 Mar 2024 08:15:48 -0700 Subject: [PATCH] Brianem/abstract pool name (#252) * abstract agent pool name behind ado labrary variable, so the same YAML can run in multiple pileines tha tuse different agent pool names. * update version of ESRP Sign that is used. * update esrp task version to an even hight number. * Can't get permissions the the SP Michael setup, so trying to create a new one * update version of .Net core needed by EsrpCodeSigning@4 --- .azure/pipelines/build.yaml | 25 ++++++++++++------------- .azure/pipelines/sign-dll-exe.yaml | 2 +- .azure/pipelines/sign-nuget.yaml | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.azure/pipelines/build.yaml b/.azure/pipelines/build.yaml index 98f8a28f..41a7ec65 100644 --- a/.azure/pipelines/build.yaml +++ b/.azure/pipelines/build.yaml @@ -7,7 +7,7 @@ pr: - main pool: - name: SkymanUbuntu2004Hosted + name: $(UbuntuPipelineName) parameters: - name: signNugetPackages @@ -79,16 +79,15 @@ stages: projects: 'src/ai/ai-cli.csproj' arguments: '--configuration Release -p:CLIAssemblyVersion=$(AICLISemVerVersion) -p:CLIAssemblyInformationalVersion=$(AICLIVersion) -p:PackageVersion=$(AICLIVersion) -o "$(Build.ArtifactStagingDirectory)"' - task: UseDotNet@2 - displayName: 'Use .NET Core 2.1 (signing requirement)' + displayName: 'Use .NET Core 6.0 (signing requirement for EsrpCodeSigning@4)' inputs: packageType: 'sdk' - version: '2.1.x' - - ${{ if eq(parameters.signNugetPackages, true) }}: - - template: sign-nuget.yaml - parameters: - displayName: 'Sign AI CLI NuGet package' - folderPath: '$(Build.ArtifactStagingDirectory)' - pattern: '$(AICLINuPkgFileName)' + version: '6.0.x' + - template: sign-nuget.yaml + parameters: + displayName: 'Sign AI CLI NuGet package' + folderPath: '$(Build.ArtifactStagingDirectory)' + pattern: '$(AICLINuPkgFileName)' - task: Bash@3 displayName: 'Create installation script' inputs: @@ -117,14 +116,14 @@ stages: - task: AzureCLI@2 displayName: Upload NuGet package inputs: - azureSubscription: 'Carbon Dropper (CSSpeechStorage Drop)' + azureSubscription: 'Carbon Dropper2 (CSSpeechStorage Drop)' scriptType: 'bash' arguments: '$(Build.ArtifactStagingDirectory)/$(AICLINuPkgFileName) private/ai/$(AICLINuPkgFileName)' scriptPath: './.azure/pipelines/scripts/upload-file.sh' - task: AzureCLI@2 displayName: Upload installation script inputs: - azureSubscription: 'Carbon Dropper (CSSpeechStorage Drop)' + azureSubscription: 'Carbon Dropper2 (CSSpeechStorage Drop)' scriptType: 'bash' arguments: '$(Build.ArtifactStagingDirectory)/InstallAzureAICLIDeb-$(AICLIVersion).sh private/ai/InstallAzureAICLIDeb-$(AICLIVersion).sh' scriptPath: './.azure/pipelines/scripts/upload-file.sh' @@ -220,7 +219,7 @@ stages: dependsOn: SetupStage condition: and(succeeded(), or(eq(variables['IsRelease'], 'true'), eq(variables['PublishDevBuild'], 'true'))) pool: - name: SkymanWS2022Compliant + name: $(WindowsPipelineName) jobs: - job: BuildWindowsInstaller variables: @@ -270,7 +269,7 @@ stages: - task: AzureCLI@2 inputs: - azureSubscription: 'Carbon Dropper (CSSpeechStorage Drop)' + azureSubscription: 'Carbon Dropper2 (CSSpeechStorage Drop)' scriptType: 'bash' arguments: '$(Build.ArtifactStagingDirectory)/Azure-AI-CLI-Setup-$(AICLIVersion)-x64.exe private/ai/Azure-AI-CLI-Setup-$(AICLIVersion)-x64.exe' scriptPath: './.azure/pipelines/scripts/upload-file.sh' diff --git a/.azure/pipelines/sign-dll-exe.yaml b/.azure/pipelines/sign-dll-exe.yaml index 8e5388a2..9e15b987 100644 --- a/.azure/pipelines/sign-dll-exe.yaml +++ b/.azure/pipelines/sign-dll-exe.yaml @@ -12,7 +12,7 @@ parameters: default: true steps: -- task: EsrpCodeSigning@2 +- task: EsrpCodeSigning@4 displayName: ${{ parameters.displayName }} inputs: ConnectedServiceName: 'Speech SDK ESRP Signing Alternate' diff --git a/.azure/pipelines/sign-nuget.yaml b/.azure/pipelines/sign-nuget.yaml index 2fbb242c..447dfbc9 100644 --- a/.azure/pipelines/sign-nuget.yaml +++ b/.azure/pipelines/sign-nuget.yaml @@ -12,7 +12,7 @@ parameters: default: true steps: -- task: EsrpCodeSigning@1 +- task: EsrpCodeSigning@4 displayName: ${{ parameters.displayName }} inputs: ConnectedServiceName: 'Speech SDK ESRP Signing Alternate'