Skip to content

Commit 64cdfaa

Browse files
authored
Remove logics from the packaging pipeline related to uploading packages to Azure blob (#295)
1 parent 48e35e9 commit 64cdfaa

File tree

5 files changed

+13
-333
lines changed

5 files changed

+13
-333
lines changed

.pipelines/Package-Official.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
trigger: none
22

33
parameters: # parameters are shown up in ADO UI in a build queue time
4-
- name: ForceAzureBlobDelete
5-
displayName: Delete Azure Blob
6-
type: string
7-
values:
8-
- true
9-
- false
10-
default: false
114
- name: 'debug'
125
displayName: 'Enable debug output'
136
type: boolean
@@ -20,8 +13,6 @@ variables:
2013
value: ${{ parameters.debug }}
2114
- name: ENABLE_PRS_DELAYSIGN
2215
value: 1
23-
- name: ForceAzureBlobDelete
24-
value: ${{ parameters.ForceAzureBlobDelete }}
2516
- name: ob_outputDirectory
2617
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
2718
- name: WindowsContainerImage
@@ -87,12 +78,7 @@ extends:
8778
tsaOptionsFile: .config\tsaoptions.json
8879

8980
stages:
90-
- stage: prep
91-
jobs:
92-
- template: /.pipelines/templates/check-Azure-container.yml@self
93-
9481
- stage: mac
95-
dependsOn: [prep]
9682
jobs:
9783
- template: /.pipelines/templates/mac-package.yml@self
9884
parameters:
@@ -102,7 +88,6 @@ extends:
10288
architecture: arm64
10389

10490
- stage: windows
105-
dependsOn: [prep]
10691
jobs:
10792
- template: /.pipelines/templates/windows-package.yml@self
10893
parameters:
@@ -115,7 +100,6 @@ extends:
115100
architecture: arm64
116101

117102
- stage: linux
118-
dependsOn: [prep]
119103
jobs:
120104
- template: /.pipelines/templates/linux-package.yml@self
121105
parameters:
@@ -125,16 +109,9 @@ extends:
125109
architecture: arm64
126110

127111
- stage: module
128-
dependsOn: [prep]
129112
jobs:
130113
- template: /.pipelines/templates/module-package.yml@self
131114

132115
- stage: nupkg
133-
dependsOn: [prep]
134116
jobs:
135117
- template: /.pipelines/templates/nupkg-package.yml@self
136-
137-
- stage: upload
138-
dependsOn: [mac, windows, linux, module, nupkg]
139-
jobs:
140-
- template: /.pipelines/templates/upload-to-Azure.yml@self

.pipelines/templates/check-Azure-container.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.

.pipelines/templates/release-msix-bundle.yml

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- group: msixTools
99
- group: 'Azure Blob variable group'
1010
- name: ob_outputDirectory
11-
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
11+
value: '$(Build.ArtifactStagingDirectory)\ONEBRANCH_ARTIFACT'
1212

1313
steps:
1414
- download: AIShellPackagePipeline
@@ -76,39 +76,16 @@ jobs:
7676
retryCountOnTaskFailure: 1
7777
7878
- pwsh: |
79-
$azureRmModule = Get-InstalledModule AzureRM -ErrorAction SilentlyContinue -Verbose
80-
if ($azureRmModule) {
81-
Write-Host 'AzureRM module exists. Removing it'
82-
Uninstall-AzureRm
83-
Write-Host 'AzureRM module removed'
79+
if (-not (Test-Path '$(ob_outputDirectory)')) {
80+
New-Item -ItemType Directory -Path '$(ob_outputDirectory)' -Force
8481
}
8582
86-
Install-Module -Name Az.Storage -Force -AllowClobber -Scope CurrentUser -Verbose
87-
displayName: Remove AzRM modules and install Az.Storage
88-
89-
- task: AzurePowerShell@5
90-
displayName: Upload msix to blob
91-
inputs:
92-
azureSubscription: az-blob-cicd-infra
93-
scriptType: inlineScript
94-
azurePowerShellVersion: LatestVersion
95-
pwsh: true
96-
inline: |
97-
$containerName = 'aish'
98-
$storageAccount = '$(PSInfraStorageAccount)'
99-
100-
$storageContext = New-AzStorageContext -StorageAccountName $storageAccount -UseConnectedAccount
101-
102-
if ($env:BundleDir) {
103-
$bundleFile = (Get-Item "$env:BundleDir\*.msixbundle").FullName
104-
$fileName = $bundleFile | Split-Path -Leaf
105-
106-
$version = [System.IO.Path]::GetFileNameWithoutExtension($fileName).Replace('AIShell-', '')
107-
$blobName = "$version/$fileName"
108-
109-
Write-Verbose -Verbose "Uploading $bundleFile to $containerName/$blobName"
110-
$null = Set-AzStorageBlobContent -File $bundleFile -Container $containerName -Blob $blobName -Context $storageContext
111-
}
112-
else{
113-
throw "BundleDir not found"
114-
}
83+
Write-Verbose -Verbose "Copying msixbundle to output directory"
84+
if ($env:BundleDir) {
85+
$bundleFile = (Get-Item "$env:BundleDir\*.msixbundle").FullName
86+
Copy-Item -Path $bundleFile -Destination '$(ob_outputDirectory)' -Force -Verbose
87+
}
88+
else{
89+
throw "BundleDir not found"
90+
}
91+
displayName: Copy msixbundle to output directory

0 commit comments

Comments
 (0)