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
2 changes: 2 additions & 0 deletions tools/releaseBuild/azureDevOps/releaseBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,5 @@ jobs:
- build_windows_x64
- build_windows_x86
- build_windows_fxdependent

- template: templates/updateBuildTable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
inputs:
signConfigXml: '$(System.ArtifactsDirectory)\package.xml'
outPathRoot: '$(Build.StagingDirectory)\signedMacOSPackages'
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'))

- template: upload-final-results.yml
parameters:
Expand Down
49 changes: 49 additions & 0 deletions tools/releaseBuild/azureDevOps/templates/updateBuildTable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
jobs:
- job: updateBuildTable
displayName: Update Build Information Table
dependsOn:
${{ parameters.parentJobs }}

# the package ES pools don't have the latest module needed to run this job
pool:
name: Hosted Mac Internal
Comment thread
TravisEz13 marked this conversation as resolved.

timeoutInMinutes: 15

steps:
- template: SetVersionVariables.yml
parameters:
ReleaseTagVar: $(ReleaseTagVar)

- powershell: |
install-module azstoragetable.travisez13 -Scope CurrentUser -Force -SkipPublisherCheck
displayName: 'Install Azure Table Module'

- powershell: |
$az_key = ConvertTo-SecureString -Force -String '$(az_key)' -AsPlainText
$az_key_cred = [PSCredential]::new('$(az_appid)',$az_key)

Write-Verbose "Connecting to Azure ..." -verbose
Connect-AzAccount -ServicePrincipal -Credential $az_key_cred -TenantId '$(az_tenantid)' -force -scope process

$table = Get-AzStorageTableTable -resourceGroup pscoredata -storageAccountName pscorebuilddata -tableName buildData

Write-Verbose "Removing existing row, if it exists ..." -verbose
$row = Remove-AzStorageTableRow -table $table -partitionkey '$(System.DefinitionId)' -rowKey '$(ReleaseTagVar)'

Write-Verbose "Adding new row ..." -verbose
$result = Add-AzStorageTableRow -table $table -partitionkey '$(System.DefinitionId)' -rowKey '$(ReleaseTagVar)' -property @{
buildid = '$(Build.BuildId)'
}
While(!$result.IsCompleted)
{
Write-Verbose -message "waiting for result" -verbose
Start-Sleep -Seconds 1
}

if(!$result.IsCompletedSuccessfully)
Comment thread
TravisEz13 marked this conversation as resolved.
{
$result
throw "adding row failed"
}
displayName: 'Add Row to Build Information Table'
3 changes: 2 additions & 1 deletion tools/releaseBuild/azureDevOps/templates/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ steps:
Destination: AzureBlob
storage: '$(StorageAccount)'
ContainerName: '$(AzureVersion)'
condition: and(succeeded(), eq('${{ parameters.msi }}', 'yes'))
condition: and(succeeded(), eq('${{ parameters.msi }}', 'yes'), eq(variables['Build.Reason'], 'Manual'))

- template: upload-final-results.yml
parameters:
Expand All @@ -33,3 +33,4 @@ steps:
Destination: AzureBlob
storage: '$(StorageAccount)'
ContainerName: '$(AzureVersion)'
condition: and(succeeded(), eq(variables['Build.Reason'], 'Manual'))