Skip to content

Commit

Permalink
Update azure-sdk-build-tools Repository Resource Refs in Yaml files (#…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
  • Loading branch information
azure-sdk and scbedd authored Feb 2, 2023
1 parent 6da835e commit 38875f6
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ param(
[string] $Target,
[Parameter(mandatory=$true)]
[string] $ArtifactStagingDirectory,
[Parameter(mandatory=$true)]
[string] $AssemblyName,
[Parameter(mandatory=$false)]
[string] $Framework = "net6.0"
)
Expand Down Expand Up @@ -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
Expand All @@ -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("`\", "/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}:
Expand All @@ -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'))
Expand All @@ -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')))
Expand Down
2 changes: 1 addition & 1 deletion src/dotnet/Mgmt.CI.BuildTools/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<LangVersion>preview</LangVersion>
<InformationalVersion>$(OfficialBuildId)</InformationalVersion>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<AssemblyName>test-proxy</AssemblyName>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net5.0'">
Expand Down
5 changes: 5 additions & 0 deletions tools/test-proxy/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 38875f6

Please sign in to comment.