Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update azure-sdk-build-tools Repository Resource Refs in Yaml files #5312

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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