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

Add azcopy support for windows arm64 for storage explorer #2816

Merged
merged 18 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
dc694c8
Add azcopy support for windows arm64 for storage explorer
dphulkar-msft Sep 26, 2024
ad4b9b5
Add azcopy support for windows arm64 for storage explorer
dphulkar-msft Sep 26, 2024
edd7e2d
Add azcopy support for windows arm64 for storage explorer
dphulkar-msft Sep 26, 2024
15500fb
Add azcopy support for windows arm64 for storage explorer
dphulkar-msft Sep 30, 2024
7336ab0
Add azcopy support for windows arm64 for storage explorer
dphulkar-msft Sep 30, 2024
9135a78
Add azcopy support for windows arm64 for storage explorer
dphulkar-msft Sep 30, 2024
fc8ae17
Add azcopy support for windows arm64 for storage explorer
dphulkar-msft Sep 30, 2024
b8a9402
Merge branch 'main' of https://github.com/Azure/azure-storage-azcopy …
dphulkar-msft Sep 30, 2024
6d87389
Add azcopy support for windows arm64 for storage
dphulkar-msft Oct 3, 2024
55e3f24
Add azcopy support for windows arm64 for storage
dphulkar-msft Oct 3, 2024
8dd485d
Add azcopy support for windows arm64 for storage
dphulkar-msft Oct 3, 2024
337628b
Update release-pipeline.yml for Azure Pipelines
vibhansa-msft Oct 3, 2024
766ba0e
Add azcopy support for windows arm64 for storage
dphulkar-msft Oct 3, 2024
c123cff
Add azcopy support for windows arm64 for storage
dphulkar-msft Oct 3, 2024
2ac0b96
Add azcopy support for windows arm64 for storage
dphulkar-msft Oct 3, 2024
8affe40
Add azcopy support for windows arm64 for storage
dphulkar-msft Oct 3, 2024
c66da36
Add azcopy support for windows arm64 for storage
dphulkar-msft Oct 3, 2024
f4845fa
Add azcopy support for windows arm64 for storage
dphulkar-msft Oct 3, 2024
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
142 changes: 136 additions & 6 deletions release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,14 @@ stages:
GOOS: windows
CGO_ENABLED: 0

- script: |
go build -tags "se_integration" -o "$(Build.ArtifactStagingDirectory)\azcopy_windows_se_arm64.exe"
displayName: 'Generate Windows ARM'
env:
GOARCH: arm64
GOOS: windows
CGO_ENABLED: 0

- task: PublishBuildArtifacts@1
inputs:
artifactName: 'azCopy-windows-temp'
Expand Down Expand Up @@ -635,7 +643,7 @@ stages:
- ImageOverride -equals $(AgentName)

variables:
- group: AZCOPY_ESRP_SECRET
- group: AZCOPY_SECRET_VAULT

steps:
- checkout: none
Expand Down Expand Up @@ -726,7 +734,7 @@ stages:
- ImageOverride -equals $(AgentName)

variables:
- group: AZCOPY_ESRP_SECRET
- group: AZCOPY_SECRET_VAULT
- name: work_dir
value: '$(System.DefaultWorkingDirectory)/azure-storage-azcopy'
- name: archives
Expand Down Expand Up @@ -818,11 +826,15 @@ stages:
windows_arm64="$(work_dir)/azcopy_windows_arm64_$(azcopy_version)"
echo "##vso[task.setvariable variable=windows_arm64]$windows_arm64"

windows_se_arm64="$(work_dir)/azcopy_windows_se_arm64_$(azcopy_version)"
echo "##vso[task.setvariable variable=windows_se_arm64]$windows_se_arm64"

windows_386="$(work_dir)/azcopy_windows_386_$(azcopy_version)"
echo "##vso[task.setvariable variable=windows_386]$windows_386"

mkdir -p $windows_amd64
mkdir -p $windows_arm64
mkdir -p $windows_se_arm64
mkdir -p $windows_386
mkdir -p $(archives)
displayName: 'Create required directories'
Expand All @@ -831,12 +843,15 @@ stages:
mv $(Build.ArtifactStagingDirectory)/azCopy-windows-temp/azcopy_windows_amd64.exe $(windows_amd64)/azcopy.exe
mv $(Build.ArtifactStagingDirectory)/azCopy-windows-temp/azcopy_windows_arm64.exe $(windows_arm64)/azcopy.exe
mv $(Build.ArtifactStagingDirectory)/azCopy-windows-temp/azcopy_windows_386.exe $(windows_386)/azcopy.exe
mv $(Build.ArtifactStagingDirectory)/azCopy-windows-temp/azcopy_windows_se_arm64.exe $(windows_se_arm64)/azcopy.exe
cp NOTICE.txt $(windows_amd64)
cp NOTICE.txt $(windows_arm64)
cp NOTICE.txt $(windows_386)
cp NOTICE.txt $(windows_se_arm64)
zip -r $(archives)/azcopy_windows_amd64_$(azcopy_version).zip .
zip -r $(archives)/azcopy_windows_arm64_$(azcopy_version).zip .
zip -r $(archives)/azcopy_windows_386_$(azcopy_version).zip .
zip -r $(archives)/azcopy_windows_se_arm64_$(azcopy_version).zip .
displayName: 'Copy required files'

- task: ArchiveFiles@2
Expand All @@ -860,6 +875,13 @@ stages:
archiveFile: '$(archives)/azcopy_windows_386_$(azcopy_version).zip'
continueOnError: true

- task: ArchiveFiles@2
displayName: 'Archive Windows SE 64 bit ARM Build'
inputs:
rootFolderOrFile: '$(windows_se_arm64)'
archiveFile: '$(archives)/azcopy_windows_se_arm64_$(azcopy_version).zip'
continueOnError: true

- script: |
cp $(archives)/azcopy_windows* $(Build.ArtifactStagingDirectory)
displayName: 'Copy zip to staging directory'
Expand Down Expand Up @@ -890,7 +912,7 @@ stages:
- ImageOverride -equals $(AgentName)

variables:
- group: AZCOPY_ESRP_SECRET
- group: AZCOPY_SECRET_VAULT

steps:
- checkout: none
Expand Down Expand Up @@ -1628,8 +1650,7 @@ stages:
}
}
displayName: 'Extract Files and Run Version and Help Command on Windows'
# TestArtifacts ends here


- job: Set_10
timeoutInMinutes: 120
strategy:
Expand Down Expand Up @@ -1669,6 +1690,115 @@ stages:
azcopy --help
displayName: 'Check Version and Help'

- job: Set_11
timeoutInMinutes: 120
strategy:
matrix:
Windows-ARM64:
agentName: "windows_arm64"
pool:
name: "azcopy_windows_arm"
demands:
- ImageOverride -equals $(AgentName)

variables:
- name: root_dir
value: '$(System.DefaultWorkingDirectory)'

steps:
- task: GoTool@0
env:
GO111MODULE: 'on'
inputs:
version: $(AZCOPY_GOLANG_VERSION)

- script: |
echo 'Running GO Vet'
go vet
displayName: 'Golang Vet - Windows'
workingDirectory: $(root_dir)

- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts'
inputs:
artifactName: 'azCopy-windows-signed'
downloadPath: $(Build.ArtifactStagingDirectory)
itemPattern: azCopy-windows-signed/azcopy_windows_se_arm64*.zip

- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$artifactDir = "$(Build.ArtifactStagingDirectory)\azCopy-windows-signed"
$extractDir = "$(Build.ArtifactStagingDirectory)\extracted"

# Find the zip file matching the pattern
$zipFile = Get-ChildItem -Path $artifactDir -Filter "azcopy*se_arm64*.zip" | Select-Object -First 1

if ($null -eq $zipFile) {
Write-Error "No zip file found matching pattern 'azcopy*se_arm64*.zip' in directory: $artifactDir"
exit 1
}

$zipFilePath = $zipFile.FullName

# Create extraction directory
New-Item -ItemType Directory -Path $extractDir -Force | Out-Null

# Extract the zip file
try {
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipFilePath, $extractDir)
} catch {
Write-Error "Failed to extract zip file: $_"
exit 1
}

# Change to the directory containing azcopy
Set-Location -Path $extractDir

# Find directories matching the pattern
$matchingDirs = Get-ChildItem -Directory -Path .\azcopy_windows_se_arm64* | Select-Object -First 1

# Check if there is exactly one matching directory
if ($matchingDirs.Count -eq 0) {
Write-Error "No directories found matching the pattern: .\azcopy_windows_se_arm64*"
exit 1
} elseif ($matchingDirs.Count -gt 1) {
Write-Error "Multiple directories found matching the pattern: .\azcopy_windows_se_arm64*"
exit 1
}

# Check if the azcopy executable exists in the matching directory
$azcopyPath = Join-Path -Path $matchingDirs.FullName -ChildPath "azcopy.exe"
if (-Not (Test-Path -Path $azcopyPath)) {
Write-Error "azcopy not found in extraction directory: $($matchingDirs.FullName)"
exit 1
} else {
Write-Output "azcopy found in extraction directory: $($matchingDirs.FullName)"
# Ensure the azcopy executable has the correct permissions
icacls $azcopyPath

# Run azcopy --version and capture output
try {
$versionOutput = & $azcopyPath --version 2>&1
Write-Output "azcopy version output: $versionOutput"
} catch {
Write-Error "Failed to run azcopy --version: $_"
}

# Run azcopy --help and capture output
try {
$helpOutput = & $azcopyPath --help 2>&1
Write-Output "azcopy help output: $helpOutput"
} catch {
Write-Error "Failed to run azcopy --help: $_"
}
}
displayName: 'Extract Files and Run Version and Help Command on Windows Arm64'

# TestArtifacts ends here

- stage: ReleaseToContainer
dependsOn: TestArtifacts
condition: succeeded('TestArtifacts')
Expand Down Expand Up @@ -1839,7 +1969,7 @@ stages:
pool:
vmImage: 'ubuntu-22.04'
variables:
- group: AZCOPY_ESRP_SECRET
- group: AZCOPY_SECRET_VAULT
- name: root_dir
value: '$(System.DefaultWorkingDirectory)'

Expand Down
Loading