[Windows] Add azcopy utility (#1008)

* azcopy10 deployment for Windows has been added

* small bugfixing

* Header has been added to Install-AzCopy.ps1

* Header has been added to Validate-AzCopy.ps1

* Packer tempaltes have been modified
This commit is contained in:
Andy Mishechkin
2020-06-08 11:59:13 +04:00
committed by GitHub
parent c471a356eb
commit 6070c25302
6 changed files with 45 additions and 0 deletions

View File

@@ -289,6 +289,12 @@
"{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-AzCopy.ps1"
]
},
{
"type": "powershell",
"scripts":[
@@ -712,6 +718,12 @@
"{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-AzCopy.ps1"
]
},
{
"type": "powershell",
"scripts":[

View File

@@ -274,6 +274,12 @@
"{{ template_dir }}/scripts/Installers/Install-AzureDevOpsCli.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-AzCopy.ps1"
]
},
{
"type": "powershell",
"scripts":[
@@ -697,6 +703,12 @@
"{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-AzCopy.ps1"
]
},
{
"type": "powershell",
"scripts":[

View File

@@ -0,0 +1,6 @@
################################################################################
## File: Install-AzCopy.ps1
## Desc: Install AzCopy10
################################################################################
Choco-Install -PackageName azcopy10

View File

@@ -0,0 +1,10 @@
################################################################################
## File: Validate-AzCopy.ps1
## Desc: Validate AzCopy10
################################################################################
if (Get-Command -Name 'azcopy') {
Write-Host "$(azcopy --version) on path"
} else {
Write-Error "azcopy not on path"
exit 1
}

View File

@@ -93,6 +93,7 @@ $markdown += New-MDList -Style Unordered -Lines @(
$markdown += New-MDHeader "CLI Tools" -Level 3
$markdown += New-MDList -Style Unordered -Lines @(
(Get-AzureCLIVersion),
(Get-AzCopyVersion),
(Get-AzureDevopsExtVersion),
(Get-AWSCLIVersion),
(Get-AWSSAMVersion),

View File

@@ -141,6 +141,10 @@ function Get-AzureCLIVersion {
return "Azure CLI $azureCLIVersion"
}
function Get-AzCopyVersion {
return ($(azcopy --version) -replace "version ")
}
function Get-AzureDevopsExtVersion {
$azureDevExtVersion = (az version | ConvertFrom-Json | Foreach{ $_."extensions" })."azure-devops"
return "Azure DevOps CLI extension $azureDevExtVersion"