Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/microsoft/AL-Go
Browse files Browse the repository at this point in the history
  • Loading branch information
mazhelez committed Nov 7, 2023
2 parents 7e80765 + 3841adc commit 3d6e371
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Actions/Github-Helper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,10 @@ function GetArtifacts {
# Use buildOutput artifact to determine the workflow run id to avoid excessive API calls
# Reason: A project called xx-main will match the artifact pattern *-main-*-version, and there might not be any artifacts matching the mask
$buildOutputPattern = "*-$branch-BuildOutput-$version"
# Old builds from PR runs are vresioned differently and should be ignored
$ignoreBuildOutputPattern1 = "*-$branch-BuildOutput-*.*.2147483647.0"
# Build Output from TestCurrent, TestNextMinor and TestNextMajor are named differently and should be ignored
$ignoreBuildOutputPattern2 = "*-$branch-BuildOutput-*-*"
Write-Host "Analyzing artifacts matching $artifactPattern"
while ($true) {
if ($total_count -eq 0) {
Expand All @@ -848,7 +852,7 @@ function GetArtifacts {
continue
}
$matchingArtifacts += @($artifacts.artifacts | Where-Object { !$_.expired -and $_.name -like $artifactPattern })
$buildOutputArtifacts += @($artifacts.artifacts | Where-Object { !$_.expired -and $_.name -like $buildOutputPattern })
$buildOutputArtifacts += @($artifacts.artifacts | Where-Object { !$_.expired -and $_.name -like $buildOutputPattern -and $_.name -notlike $ignoreBuildOutputPattern1 -and $_.name -notlike $ignoreBuildOutputPattern2 })
if ($buildOutputArtifacts.Count -gt 0) {
# We have matching artifacts.
# If the last artifact in the list of artifacts read is not from the same workflow run, there are no more matching artifacts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }}
secrets: 'licenseFileUrl,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString'
publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }}
artifactsNameSuffix: 'PR${{ github.event.number }}'

StatusCheck:
runs-on: [ windows-latest ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }}
secrets: 'licenseFileUrl,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString'
publishThisBuildArtifacts: ${{ needs.Initialization.outputs.workflowDepth > 1 }}
artifactsNameSuffix: 'PR${{ github.event.number }}'

StatusCheck:
runs-on: [ windows-latest ]
Expand Down

0 comments on commit 3d6e371

Please sign in to comment.