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

[CI Environment] Disabled PowerShell 'latest' installation (by default) #2675

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
30 changes: 13 additions & 17 deletions utilities/pipelines/sharedScripts/Set-EnvironmentOnAgent.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,19 @@ function Set-EnvironmentOnAgent {
Write-Verbose 'Powershell version:' -Verbose
$PSVersionTable

# # Update the list of packages
# sudo apt-get update
# # Install pre-requisite packages.
# sudo apt-get install -y wget apt-transport-https software-properties-common
# # Download the Microsoft repository GPG keys
# wget -q "https://packages.microsoft.com/config/ubuntu/`$(lsb_release -rs)/packages-microsoft-prod.deb"
# # Register the Microsoft repository GPG keys
# sudo dpkg -i packages-microsoft-prod.deb
# # Update the list of packages after we added packages.microsoft.com
# sudo apt-get update
# # Install PowerShell
# sudo apt-get install -y powershell

###########################
## Install Azure CLI ##
###########################
Expand Down Expand Up @@ -248,21 +261,4 @@ function Set-EnvironmentOnAgent {
}

Write-Verbose ('Install-CustomModule end') -Verbose

#####################################
## TEMP PowerShell installation ##
#####################################

# Update the list of packages
sudo apt-get update
# Install pre-requisite packages.
sudo apt-get install -y wget apt-transport-https software-properties-common
# Download the Microsoft repository GPG keys
wget -q "https://packages.microsoft.com/config/ubuntu/`$(lsb_release -rs)/packages-microsoft-prod.deb"
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of packages after we added packages.microsoft.com
sudo apt-get update
# Install PowerShell
sudo apt-get install -y powershell
}