Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions tools/releaseBuild/azureDevOps/releaseBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,62 @@ resources:
clean: true

jobs:
- template: templates/checkAzureContainer.yml

- template: templates/linux.yml
parameters:
buildName: deb
parentJob: DeleteBlob

- template: templates/linux.yml
parameters:
buildName: rpm
uploadDisplayName: Upload and Sign
parentJob: DeleteBlob

- template: templates/linux.yml
parameters:
buildName: fxdependent
parentJob: DeleteBlob

- template: templates/linux.yml
parameters:
buildName: alpine
parentJob: DeleteBlob

- template: templates/mac.yml
parameters:
parentJob: DeleteBlob

- template: templates/windows-hosted-build.yml
parameters:
Architecture: x64
parentJob: DeleteBlob

- template: templates/windows-hosted-build.yml
parameters:
Architecture: x86
parentJob: DeleteBlob

- template: templates/windows-hosted-build.yml
parameters:
Architecture: arm
parentJob: DeleteBlob

- template: templates/windows-hosted-build.yml
parameters:
Architecture: arm64
parentJob: DeleteBlob

- template: templates/windows-hosted-build.yml
parameters:
Architecture: fxdependent
parentJob: DeleteBlob

- template: templates/windows-hosted-build.yml
parameters:
Architecture: fxdependentWinDesktop
parentJob: DeleteBlob

- template: templates/windows-packaging.yml
parameters:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
jobs:
- job: DeleteBlob
displayName: Delete blob is exists
pool:
vmImage: windows-latest
steps:
- template: SetVersionVariables.yml
parameters:
ReleaseTagVar: $(ReleaseTagVar)

- task: AzurePowerShell@4
inputs:
azureSubscription: '$(AzureFileCopySubscription)'
scriptType: inlineScript
azurePowerShellVersion: latestVersion
inline: |
try {
$container = Get-AzStorageContainer -Container '$(AzureVersion)' -Context (New-AzStorageContext -StorageAccountName '$(StorageAccount)') -ErrorAction Stop

if ($container -ne $null -and '$(ForceAzureBlobDelete)' -eq 'false') {
throw 'Azure blob container $(AzureVersion) already exists. To overwrite, use ForceAzureBlobDelete parameter'
}
elseif ($container -ne $null -and '$(ForceAzureBlobDelete)' -eq 'true') {
Write-Verbose -Verbose 'Removing container $(AzureVersion) due to ForceAzureBlobDelete parameter'
Remove-AzStorageContainer -Name '$(AzureVersion)' -Context (New-AzStorageContext -StorageAccountName '$(StorageAccount)') -Force
}
}
catch {
if ($_.FullyQualifiedErrorId -eq 'ResourceNotFoundException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageContainerCommand') {
Write-Verbose -Verbose 'Container "$(AzureVersion)" does not exists.'
}
else {
throw $_
}
}


2 changes: 2 additions & 0 deletions tools/releaseBuild/azureDevOps/templates/linux.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
parameters:
buildName: ''
uploadDisplayName: 'Upload'
parentJob: ''

jobs:
- job: build_${{ parameters.buildName }}
displayName: Build ${{ parameters.buildName }}
condition: succeeded()
pool: Hosted Ubuntu 1604
dependsOn: ${{ parameters.parentJob }}
variables:
build: ${{ parameters.buildName }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions tools/releaseBuild/azureDevOps/templates/mac.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
parameters:
jobName: 'build_macOS'
parentJob: ''

jobs:
- job: ${{ parameters.jobName }}
displayName: Build macOS
condition: succeeded()
pool: Hosted Mac Internal
dependsOn: ${{ parameters.parentJob }}
variables:
# Turn off Homebrew analytics
HOMEBREW_NO_ANALYTICS: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ parameters:
BuildConfiguration: release
BuildPlatform: any cpu
Architecture: x64

parentJob: ''
jobs:
- job: build_windows_${{ parameters.Architecture }}
displayName: Build Windows - ${{ parameters.Architecture }}
condition: succeeded()
dependsOn: ${{ parameters.parentJob }}
pool:
vmImage: windows-latest
variables:
Expand Down