Skip to content

Commit

Permalink
Remove sudo From test-binaries.yml (#6472)
Browse files Browse the repository at this point in the history
* Update dotnet-monitor-public.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update dotnet-monitor-public.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml

* Update test-binaries.yml
  • Loading branch information
kkeirstead authored and github-actions committed Apr 20, 2024
1 parent 84f4d7e commit 7459b4c
Showing 1 changed file with 44 additions and 19 deletions.
63 changes: 44 additions & 19 deletions eng/pipelines/jobs/test-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,52 @@ jobs:
- ${{ if ne(parameters.osGroup, 'Linux_Musl')}}:
# Linux builds (of all variants) run in Mariner containers and do not include pwsh by default
- ${{ if eq(parameters.osGroup, 'Linux') }}:
- script: sudo -n tdnf install -y --refresh powershell
- script: |
$(Build.SourcesDirectory)/restore.sh
$(Build.SourcesDirectory)/.dotnet/dotnet tool install --global PowerShell
echo "##vso[task.prependpath]/home/cloudtest_azpcontainer/.dotnet/tools"
displayName: Install pwsh
# Calculate the fully qualified Nodejs version first so that any new releases will result in a new cache key
- pwsh: eng/helix/GetNodejsVersion.ps1
-MajorVersion $(NodeMajorVersion)
-TaskVariableName 'FqNodejsVersion'
displayName: Calculate Node.js version

- task: Cache@2
displayName: Node.js Cache
inputs:
# Wrap FqNodejsVersion in quotes to prevent it being interpreted as a file
key: 'nodejs | ${{ parameters.osGroup }} | ${{ parameters.architecture }} | "$(FqNodejsVersion)"'
path: $(HelixNodejsPayloadPath)

- pwsh: eng/helix/InstallNodejs.ps1
-Version $(FqNodejsVersion)
-Architecture ${{ parameters.architecture }}
-DestinationFolder "$(HelixNodejsPayloadPath)"
displayName: Hydrate Node.js Installation
# Calculate the fully qualified Nodejs version first so that any new releases will result in a new cache key
- script: |
pwsh ../eng/helix/GetNodejsVersion.ps1 -MajorVersion $(NodeMajorVersion) -TaskVariableName 'FqNodejsVersion'
displayName: Calculate Node.js version Linux
workingDirectory: "$(Build.SourcesDirectory)/.dotnet"
env:
DOTNET_ROOT: "$(Build.SourcesDirectory)/.dotnet"
- task: Cache@2
displayName: Node.js Cache Linux
inputs:
# Wrap FqNodejsVersion in quotes to prevent it being interpreted as a file
key: 'nodejs | ${{ parameters.osGroup }} | ${{ parameters.architecture }} | "$(FqNodejsVersion)"'
path: $(HelixNodejsPayloadPath)

- script: |
pwsh ../eng/helix/InstallNodejs.ps1 -Version $(FqNodejsVersion) -Architecture ${{ parameters.architecture }} -DestinationFolder "$(HelixNodejsPayloadPath)"
displayName: Hydrate Node.js Installation Linux
workingDirectory: "$(Build.SourcesDirectory)/.dotnet"
env:
DOTNET_ROOT: "$(Build.SourcesDirectory)/.dotnet"
- ${{ else }}:
- pwsh: eng/helix/GetNodejsVersion.ps1
-MajorVersion $(NodeMajorVersion)
-TaskVariableName 'FqNodejsVersion'
displayName: Calculate Node.js version Non-Linux

- task: Cache@2
displayName: Node.js Cache Non-Linux
inputs:
# Wrap FqNodejsVersion in quotes to prevent it being interpreted as a file
key: 'nodejs | ${{ parameters.osGroup }} | ${{ parameters.architecture }} | "$(FqNodejsVersion)"'
path: $(HelixNodejsPayloadPath)

- pwsh: eng/helix/InstallNodejs.ps1
-Version $(FqNodejsVersion)
-Architecture ${{ parameters.architecture }}
-DestinationFolder "$(HelixNodejsPayloadPath)"
displayName: Hydrate Node.js Installation Non-Linux

- ${{ else }}:
- ${{ if ne(parameters.osGroup, 'Windows') }}:
Expand Down

0 comments on commit 7459b4c

Please sign in to comment.