Install AWS SAM CLI on Windows images (#737)

* Add AWS SAM

* Change utility name to upper case

Co-authored-by: Sergey Dolin <v-sedoli@micorosoft.com>
This commit is contained in:
Sergey Dolin
2020-04-22 14:31:25 +05:00
committed by GitHub
parent 6b24b4ce38
commit a174930790
4 changed files with 58 additions and 0 deletions

View File

@@ -454,6 +454,12 @@
"{{ template_dir }}/scripts/Installers/Install-AWS.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-AWS-SAM.ps1"
]
},
{
"type": "powershell",
"scripts":[
@@ -615,6 +621,12 @@
"{{ template_dir }}/scripts/Installers/Validate-AzureCli.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-AWS-SAM.ps1"
]
},
{
"type": "powershell",
"scripts":[

View File

@@ -433,6 +433,12 @@
"{{ template_dir }}/scripts/Installers/Install-AWS.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-AWS-SAM.ps1"
]
},
{
"type": "powershell",
"scripts":[
@@ -612,6 +618,12 @@
"{{ template_dir }}/scripts/Installers/Validate-AzureCli.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-AWS-SAM.ps1"
]
},
{
"type": "powershell",
"scripts":[

View File

@@ -0,0 +1,7 @@
################################################################################
## File: Install-AWS-SAM.ps1
## Desc: Install aws sam cli
## https://aws.amazon.com/serverless/sam/
################################################################################
Install-MSI -MsiUrl "https://github.com/awslabs/aws-sam-cli/releases/latest/download/AWS_SAM_CLI_64_PY3.msi" -MsiName "AWS_SAM_CLI_64_PY3.msi"

View File

@@ -0,0 +1,27 @@
################################################################################
## File: Validate-AWS-SAM.ps1
## Desc: Validate aws sam cli
################################################################################
$command = Get-Command -Name 'sam'
if ($command)
{
Write-Host "AWS SAM CLI on path"
}
else
{
Write-Host 'AWS SAM CLI is not on path'
exit 1
}
# Adding description of the software to Markdown
$SoftwareName = "AWS SAM CLI"
$version = (sam --version).Split(" ")[3]
$Description = @"
_Version:_ $version<br/>
"@
Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description