From dc694c8a1f8184e01a283397cd76e2387cdfacd6 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 26 Sep 2024 11:29:23 +0530 Subject: [PATCH 01/16] Add azcopy support for windows arm64 for storage explorer --- release-pipeline.yml | 131 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 2 deletions(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index b3c92f96a..d09741400 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -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' @@ -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' @@ -834,9 +846,11 @@ stages: 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 @@ -860,6 +874,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' @@ -1527,7 +1548,7 @@ stages: timeoutInMinutes: 120 strategy: matrix: - Windows: + Windows_Amd64: imageName: 'windows-2019' type: 'windows' pool: @@ -1629,8 +1650,114 @@ stages: } displayName: 'Extract Files and Run Version and Help Command on Windows' # TestArtifacts ends here - - job: Set_10 + timeoutInMinutes: 120 + strategy: + matrix: + Windows_SE_Arm64: + imageName: 'windows-2019' + type: 'windows' + pool: + vmImage: $(imageName) + + 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*arm64*.zip" | Select-Object -First 1 + + if ($null -eq $zipFile) { + Write-Error "No zip file found matching pattern 'azcopy*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' + # TestArtifacts ends here + + - job: Set_11 timeoutInMinutes: 120 strategy: matrix: From ad4b9b5b71770a90833553ed6a52206a20bd335f Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 26 Sep 2024 12:58:03 +0530 Subject: [PATCH 02/16] Add azcopy support for windows arm64 for storage explorer --- release-pipeline.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/release-pipeline.yml b/release-pipeline.yml index d09741400..1a1c65c47 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -843,6 +843,7 @@ 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) From edd7e2d79dabf309fdb7042220b071e69d5075e6 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 26 Sep 2024 14:38:38 +0530 Subject: [PATCH 03/16] Add azcopy support for windows arm64 for storage explorer --- release-pipeline.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release-pipeline.yml b/release-pipeline.yml index 1a1c65c47..5ebd37c37 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1633,6 +1633,10 @@ stages: # Ensure the azcopy executable has the correct permissions icacls $azcopyPath + $env:GOARCH = "arm64" + $env:GOOS = "windows" + $env:CGO_ENABLED = "0" + # Run azcopy --version and capture output try { $versionOutput = & $azcopyPath --version 2>&1 From 15500fb1a9b9ea5e0bfd7dd99c6fd25fc92ca323 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Mon, 30 Sep 2024 12:46:06 +0530 Subject: [PATCH 04/16] Add azcopy support for windows arm64 for storage explorer --- release-pipeline.yml | 108 +------------------------------------------ 1 file changed, 1 insertion(+), 107 deletions(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index 5ebd37c37..de2928057 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1655,113 +1655,7 @@ stages: } displayName: 'Extract Files and Run Version and Help Command on Windows' # TestArtifacts ends here - - job: Set_10 - timeoutInMinutes: 120 - strategy: - matrix: - Windows_SE_Arm64: - imageName: 'windows-2019' - type: 'windows' - pool: - vmImage: $(imageName) - - 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*arm64*.zip" | Select-Object -First 1 - - if ($null -eq $zipFile) { - Write-Error "No zip file found matching pattern 'azcopy*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' - # TestArtifacts ends here - + - job: Set_11 timeoutInMinutes: 120 strategy: From 7336ab0f598651fe7a8ea4653577d5ae56d71699 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Mon, 30 Sep 2024 12:59:37 +0530 Subject: [PATCH 05/16] Add azcopy support for windows arm64 for storage explorer --- release-pipeline.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index de2928057..f351935cc 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1633,10 +1633,6 @@ stages: # Ensure the azcopy executable has the correct permissions icacls $azcopyPath - $env:GOARCH = "arm64" - $env:GOOS = "windows" - $env:CGO_ENABLED = "0" - # Run azcopy --version and capture output try { $versionOutput = & $azcopyPath --version 2>&1 From 9135a783ce4ad9999c126ad126bcbd343bba02a9 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Mon, 30 Sep 2024 13:00:44 +0530 Subject: [PATCH 06/16] Add azcopy support for windows arm64 for storage explorer --- release-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index f351935cc..75bea057e 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1549,7 +1549,7 @@ stages: timeoutInMinutes: 120 strategy: matrix: - Windows_Amd64: + Windows: imageName: 'windows-2019' type: 'windows' pool: @@ -1652,7 +1652,7 @@ stages: displayName: 'Extract Files and Run Version and Help Command on Windows' # TestArtifacts ends here - - job: Set_11 + - job: Set_10 timeoutInMinutes: 120 strategy: matrix: From fc8ae17f4115126012d783940603065a13d966cd Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Mon, 30 Sep 2024 13:02:10 +0530 Subject: [PATCH 07/16] Add azcopy support for windows arm64 for storage explorer --- release-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index 75bea057e..ed80a361d 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1650,7 +1650,6 @@ stages: } } displayName: 'Extract Files and Run Version and Help Command on Windows' - # TestArtifacts ends here - job: Set_10 timeoutInMinutes: 120 @@ -1690,6 +1689,7 @@ stages: azcopy --version azcopy --help displayName: 'Check Version and Help' + # TestArtifacts ends here - stage: ReleaseToContainer dependsOn: TestArtifacts From 6d873896579865cee63d99db1c47b77e6bb17575 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 3 Oct 2024 11:28:56 +0530 Subject: [PATCH 08/16] Add azcopy support for windows arm64 for storage --- release-pipeline.yml | 108 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/release-pipeline.yml b/release-pipeline.yml index ed80a361d..49012ffc6 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1689,6 +1689,114 @@ stages: azcopy --version 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' + # TestArtifacts ends here - stage: ReleaseToContainer From 55e3f24fe8a05993db68904c561ccc561903f818 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 3 Oct 2024 11:32:51 +0530 Subject: [PATCH 09/16] Add azcopy support for windows arm64 for storage --- release-pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index 49012ffc6..737cb56cd 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -643,7 +643,7 @@ stages: - ImageOverride -equals $(AgentName) variables: - - group: AZCOPY_ESRP_SECRET + - group: AZCOPY_SECRET_VAULT steps: - checkout: none @@ -734,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 @@ -1969,7 +1969,7 @@ stages: pool: vmImage: 'ubuntu-22.04' variables: - - group: AZCOPY_ESRP_SECRET + - group: AZCOPY_SECRET_VAULT - name: root_dir value: '$(System.DefaultWorkingDirectory)' From 8dd485dd2f105ddb8d5cd28953a34336dc086897 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 3 Oct 2024 11:35:21 +0530 Subject: [PATCH 10/16] Add azcopy support for windows arm64 for storage --- release-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index 737cb56cd..a6df9768f 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -912,7 +912,7 @@ stages: - ImageOverride -equals $(AgentName) variables: - - group: AZCOPY_ESRP_SECRET + - group: AZCOPY_SECRET_VAULT steps: - checkout: none From 337628bee76be47be92831e3cd2cd2abb9102b8e Mon Sep 17 00:00:00 2001 From: Vikas Bhansali <64532198+vibhansa-msft@users.noreply.github.com> Date: Thu, 3 Oct 2024 11:44:38 +0530 Subject: [PATCH 11/16] Update release-pipeline.yml for Azure Pipelines Remove agent name --- release-pipeline.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index a6df9768f..ee7c4a263 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1698,8 +1698,6 @@ stages: agentName: "windows_arm64" pool: name: azcopy_windows_arm" - demands: - - ImageOverride -equals $(AgentName) variables: - name: root_dir From 766ba0ea9b0d9086f6ef17d53674a27cce9186d9 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 3 Oct 2024 11:48:07 +0530 Subject: [PATCH 12/16] Add azcopy support for windows arm64 for storage --- release-pipeline.yml | 206 +++++++++++++++++++++---------------------- 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index a6df9768f..906af8a1e 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1690,112 +1690,112 @@ 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)' + # - 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 + # 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" + # - 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' + # # 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 From 2ac0b96706e7f3befc04ca1a7b2dc3b38874c2c8 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 3 Oct 2024 11:57:37 +0530 Subject: [PATCH 13/16] Add azcopy support for windows arm64 for storage --- release-pipeline.yml | 204 +++++++++++++++++++++---------------------- 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index b765ca175..1ec7bed09 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1690,111 +1690,111 @@ 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)' + - 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 + 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" + - 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' + # 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 From 8affe40cebcc7c7a8eeedd59738b9e452eef0ac7 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 3 Oct 2024 12:27:48 +0530 Subject: [PATCH 14/16] Add azcopy support for windows arm64 for storage --- release-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index 1ec7bed09..b567350a8 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1697,7 +1697,7 @@ stages: Windows-ARM64: agentName: "windows_arm64" pool: - name: azcopy_windows_arm" + name: blobfuse-ubn-arm64-pool" demands: - ImageOverride -equals $(AgentName) variables: From c66da3678a555ca80bbbd825cd92460f9e9fb780 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 3 Oct 2024 12:29:37 +0530 Subject: [PATCH 15/16] Add azcopy support for windows arm64 for storage --- release-pipeline.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index b567350a8..8ca54eaaf 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1697,9 +1697,10 @@ stages: Windows-ARM64: agentName: "windows_arm64" pool: - name: blobfuse-ubn-arm64-pool" - demands: - - ImageOverride -equals $(AgentName) + name: "blobfuse-ubn-arm64-pool" + demands: + - ImageOverride -equals $(AgentName) + variables: - name: root_dir value: '$(System.DefaultWorkingDirectory)' From f4845faac509624a22019e10cb8c2b885c659c80 Mon Sep 17 00:00:00 2001 From: Dhanashree Phulkar Date: Thu, 3 Oct 2024 12:30:37 +0530 Subject: [PATCH 16/16] Add azcopy support for windows arm64 for storage --- release-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-pipeline.yml b/release-pipeline.yml index 8ca54eaaf..1bd0fafaf 100644 --- a/release-pipeline.yml +++ b/release-pipeline.yml @@ -1697,7 +1697,7 @@ stages: Windows-ARM64: agentName: "windows_arm64" pool: - name: "blobfuse-ubn-arm64-pool" + name: "azcopy_windows_arm" demands: - ImageOverride -equals $(AgentName)