From 38875f62971f2911d33cd3afff0c10798c371720 Mon Sep 17 00:00:00 2001
From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Date: Wed, 1 Feb 2023 16:15:06 -0800
Subject: [PATCH] Update azure-sdk-build-tools Repository Resource Refs in Yaml
files (#5312)
* Update azure-sdk-build-tools Repository Resource Refs in Yaml files
* necessary tooling updates to enable a clean assembly of the test-proxy
---------
Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
---
.../templates/jobs/azuresdkpartnerdrops-to-nugetfeed.yml | 2 +-
.../templates/scripts/assemble-dotnet-standalone-exe.ps1 | 7 +++++--
.../templates/stages/archetype-sdk-tool-dotnet.yml | 2 +-
.../templates/steps/produce-net-standalone-packs.yml | 5 +++++
src/dotnet/Mgmt.CI.BuildTools/ci.yml | 2 +-
.../Azure.Sdk.Tools.TestProxy.csproj | 1 -
tools/test-proxy/ci.yml | 5 +++++
7 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/eng/pipelines/templates/jobs/azuresdkpartnerdrops-to-nugetfeed.yml b/eng/pipelines/templates/jobs/azuresdkpartnerdrops-to-nugetfeed.yml
index c5c9a77c6fb..423bdec44ea 100644
--- a/eng/pipelines/templates/jobs/azuresdkpartnerdrops-to-nugetfeed.yml
+++ b/eng/pipelines/templates/jobs/azuresdkpartnerdrops-to-nugetfeed.yml
@@ -4,7 +4,7 @@ resources:
- repository: azure-sdk-build-tools
type: git
name: internal/azure-sdk-build-tools
- ref: refs/tags/azure-sdk-build-tools_20230126.1
+ ref: refs/tags/azure-sdk-build-tools_20230201.1
parameters:
- name: BuildToolsRepoPath
diff --git a/eng/pipelines/templates/scripts/assemble-dotnet-standalone-exe.ps1 b/eng/pipelines/templates/scripts/assemble-dotnet-standalone-exe.ps1
index 0fbc91d9b15..6de6cb648a1 100644
--- a/eng/pipelines/templates/scripts/assemble-dotnet-standalone-exe.ps1
+++ b/eng/pipelines/templates/scripts/assemble-dotnet-standalone-exe.ps1
@@ -26,6 +26,8 @@ param(
[string] $Target,
[Parameter(mandatory=$true)]
[string] $ArtifactStagingDirectory,
+ [Parameter(mandatory=$true)]
+ [string] $AssemblyName,
[Parameter(mandatory=$false)]
[string] $Framework = "net6.0"
)
@@ -60,7 +62,8 @@ if ("$($Rid)".Contains("linux")){
Push-Location "$outputPath"
# The sum contents within this folder will be: `appSettings.json`, `test-proxy.pdb`, `test-proxy` (the binary), and a certificate.
# This statement grabs the first extensionless file within the produced binary folder, which will always be the binary we need to set the executable bit on.
- $binaryFile = (Get-ChildItem -Path . | Where-Object { !([System.IO.Path]::HasExtension($_)) } | Select-Object -First 1).ToString().Replace("`\","/")
+ $binaryFile = (Get-ChildItem -Path . | Where-Object { $_.Name -eq $AssemblyName } | Select-Object -First 1).ToString().Replace("`\","/")
+
bash -c "chmod +x $binaryFile"
tar -cvzf "$($destinationPathSegment).tar.gz" .
Pop-Location
@@ -70,7 +73,7 @@ elseif("$($Rid)".Contains("osx")){
# a mac system. However, the `codesign` command is only available on a MacOS agent. With that being the case, we simply special case
# this function here to ensure that the script does not fail outside of a MacOS agent.
if ($IsMacOS) {
- $binaryFile = Get-ChildItem -Path $outputPath | Where-Object { !([System.IO.Path]::hasExtension($_)) } | Select-Object -First 1
+ $binaryFile = Get-ChildItem -Path $outputPath | Where-Object { $_.Name -eq $AssemblyName } | Select-Object -First 1
$binaryFileBash = $binaryFile.ToString().Replace("`\","/")
$entitlements = (Resolve-Path -Path (Join-Path $PSScriptRoot ".." ".." ".." "dotnet-executable-entitlements.plist")).ToString().Replace("`\", "/")
diff --git a/eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml b/eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml
index 9ed79b98c2b..c2082a4aefe 100644
--- a/eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml
+++ b/eng/pipelines/templates/stages/archetype-sdk-tool-dotnet.yml
@@ -3,7 +3,7 @@ resources:
- repository: azure-sdk-build-tools
type: git
name: internal/azure-sdk-build-tools
- ref: refs/tags/azure-sdk-build-tools_20230126.1
+ ref: refs/tags/azure-sdk-build-tools_20230201.1
parameters:
- name: ToolDirectory
diff --git a/eng/pipelines/templates/steps/produce-net-standalone-packs.yml b/eng/pipelines/templates/steps/produce-net-standalone-packs.yml
index 82704b05a99..ef13615a1cc 100644
--- a/eng/pipelines/templates/steps/produce-net-standalone-packs.yml
+++ b/eng/pipelines/templates/steps/produce-net-standalone-packs.yml
@@ -11,10 +11,13 @@ parameters:
# A `BuildMatrix` is merely a list of possible targeted platforms. .NET 6+ can build for any target from any other target.
# - rid: win-x64
# framework: net6.0
+ # assembly: Azure.Sdk.Tools.TestProxy
# - rid: linux-x64
# framework: net6.0
+ # assembly: Azure.Sdk.Tools.TestProxy
# - rid: osx-x64
# framework: net6.0
+ # assembly: Azure.Sdk.Tools.TestProxy
steps:
- ${{ each target in parameters.BuildMatrix }}:
@@ -29,6 +32,7 @@ steps:
-Target "${{ parameters.TargetDirectory }}"
-ArtifactStagingDirectory "$(Build.ArtifactStagingDirectory)"
-Framework "${{ target.framework }}"
+ -AssemblyName "${{ target.assembly }}"
pwsh: true
displayName: 'Produce Executable for ${{ target.rid }}'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
@@ -53,6 +57,7 @@ steps:
-Target "${{ parameters.TargetDirectory }}"
-ArtifactStagingDirectory "$(Build.ArtifactStagingDirectory)"
-Framework "${{ target.framework }}"
+ -AssemblyName "${{ target.assembly }}"
pwsh: true
displayName: 'Produce Executable for ${{ target.rid }}'
condition: and(succeeded(), not(eq(variables['Agent.OS'], 'Darwin')))
diff --git a/src/dotnet/Mgmt.CI.BuildTools/ci.yml b/src/dotnet/Mgmt.CI.BuildTools/ci.yml
index 29135e1f148..49863c18975 100644
--- a/src/dotnet/Mgmt.CI.BuildTools/ci.yml
+++ b/src/dotnet/Mgmt.CI.BuildTools/ci.yml
@@ -8,7 +8,7 @@ resources:
- repository: azure-sdk-build-tools
type: git
name: internal/azure-sdk-build-tools
- ref: refs/tags/azure-sdk-build-tools_20230126.1
+ ref: refs/tags/azure-sdk-build-tools_20230201.1
variables:
- template: /eng/pipelines/templates/variables/globals.yml
diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Azure.Sdk.Tools.TestProxy.csproj b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Azure.Sdk.Tools.TestProxy.csproj
index 1fa934582d3..274d5a4c52e 100644
--- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Azure.Sdk.Tools.TestProxy.csproj
+++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Azure.Sdk.Tools.TestProxy.csproj
@@ -9,7 +9,6 @@
preview
$(OfficialBuildId)
false
- test-proxy
diff --git a/tools/test-proxy/ci.yml b/tools/test-proxy/ci.yml
index dd45c7298bd..199f7130872 100644
--- a/tools/test-proxy/ci.yml
+++ b/tools/test-proxy/ci.yml
@@ -53,11 +53,16 @@ extends:
StandaloneExeMatrix:
- rid: osx-x64
framework: net6.0
+ assembly: Azure.Sdk.Tools.TestProxy
- rid: osx-arm64
framework: net6.0
+ assembly: Azure.Sdk.Tools.TestProxy
- rid: win-x64
framework: net6.0
+ assembly: Azure.Sdk.Tools.TestProxy
- rid: linux-x64
framework: net6.0
+ assembly: Azure.Sdk.Tools.TestProxy
- rid: linux-arm64
framework: net6.0
+ assembly: Azure.Sdk.Tools.TestProxy