Skip to content

Commit

Permalink
Add Azure PS modules (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin-Walsh authored Sep 21, 2021
1 parent e4eb6e0 commit 901de9d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion windows.ltsc2019/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ARG Aws_Cli_Version=2.0.60
ARG Aws_Iam_Authenticator_Version=0.5.3
ARG Aws_Powershell_Version=4.1.2
ARG Azure_Cli_Version=2.14.0
ARG Azure_Powershell_Version=4.5.0
ARG Eks_Cli_Version=0.25.0
ARG Google_Cloud_Cli_Version=339.0.0
ARG Helm_Version=3.3.0
Expand Down Expand Up @@ -45,11 +46,16 @@ RUN choco install awscli -y --version $Env:Aws_Cli_Version --no-progress
# Install the AWS IAM Authenticator
RUN choco install aws-iam-authenticator -y --version $Env:Aws_Iam_Authenticator_Version --no-progress

# # Install AWS PowerShell module
# # Install AWS PowerShell modules
# # https://docs.aws.amazon.com/powershell/latest/userguide/pstools-getting-set-up-windows.html#ps-installing-awspowershellnetcore
RUN Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force; `
Install-Module -name AWSPowerShell.NetCore -RequiredVersion $Env:Aws_Powershell_Version -Force

#Install Azure PowerShell modules
# https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1
RUN Install-Module -Force -Name Az -AllowClobber -Scope AllUsers -MaximumVersion $Env:Azure_Powershell_Version; `
Enable-AzureRmAlias -Scope LocalMachine

# # Install NodeJS
RUN choco install nodejs-lts -y --version $Env:Node_Version --no-progress

Expand Down
4 changes: 4 additions & 0 deletions windows.ltsc2019/spec/windows.ltsc2019.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Describe 'installed dependencies' {
$output.'azure-cli' | Should -Be '2.14.0'
$LASTEXITCODE | Should -be 0
}

It 'has az powershell module installed' {
(Get-Module Az -ListAvailable).Version.ToString() | should -be '4.5.0'
}

It 'has aws cli installed' {
aws --version 2>&1 | Should -Match '2.0.60'
Expand Down

0 comments on commit 901de9d

Please sign in to comment.