Skip to content

Commit aca0ff0

Browse files
authored
Incremental builds doesn't work in single project repos (#1476)
Co-authored-by: freddydk <[email protected]>
1 parent 2da6c0d commit aca0ff0

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,20 @@ function Get-UnmodifiedAppsFromBaselineWorkflowRun {
395395
OutputMessageAndArray -message "Modified folders" -arrayOfStrings $modifiedFolders
396396
Sort-AppFoldersByDependencies -appFolders $allFolders -baseFolder $baseFolder -skippedApps ([ref] $skipFolders) -unknownDependencies ([ref]$unknownDependencies) -knownApps ([ref] $knownApps) -selectSubordinates $modifiedFolders | Out-Null
397397
OutputMessageAndArray -message "Skip folders" -arrayOfStrings $skipFolders
398+
399+
$projectWithSeperator = ''
400+
if ($project) {
401+
$projectWithSeperator = "$project$([System.IO.Path]::DirectorySeparatorChar)"
402+
}
403+
398404
# AppFolders, TestFolders and BcptTestFolders in settings are always preceded by ./ or .\, so we need to remove that (hence Substring(2))
399-
$downloadAppFolders = @($settings.appFolders | Where-Object { $skipFolders -contains "$project$([System.IO.Path]::DirectorySeparatorChar)$($_.SubString(2))" })
400-
$downloadTestFolders = @($settings.testFolders | Where-Object { $skipFolders -contains "$project$([System.IO.Path]::DirectorySeparatorChar)$($_.SubString(2))" })
401-
$downloadBcptTestFolders = @($settings.bcptTestFolders | Where-Object { $skipFolders -contains "$project$([System.IO.Path]::DirectorySeparatorChar)$($_.SubString(2))" })
405+
$downloadAppFolders = @($settings.appFolders | Where-Object { $skipFolders -contains "$projectWithSeperator$($_.SubString(2))" })
406+
$downloadTestFolders = @($settings.testFolders | Where-Object { $skipFolders -contains "$projectWithSeperator$($_.SubString(2))" })
407+
$downloadBcptTestFolders = @($settings.bcptTestFolders | Where-Object { $skipFolders -contains "$projectWithSeperator$($_.SubString(2))" })
408+
409+
OutputMessageAndArray -message "Download appFolders" -arrayOfStrings $downloadAppFolders
410+
OutputMessageAndArray -message "Download testFolders" -arrayOfStrings $downloadTestFolders
411+
OutputMessageAndArray -message "Download bcptTestFolders" -arrayOfStrings $downloadBcptTestFolders
402412

403413
if ($project) { $projectName = $project } else { $projectName = $env:GITHUB_REPOSITORY -replace '.+/' }
404414
# Download missing apps - or add then to build folders if the artifact doesn't exist

e2eTests/scenarios/BCApps/runtest.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ Write-Host -ForegroundColor Yellow @'
3939

4040
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
4141

42+
if ($linux) {
43+
Write-Host 'This test is forking BCApps and should only run once, using the settings in BCApps.'
44+
exit
45+
}
46+
4247
Remove-Module e2eTestHelper -ErrorAction SilentlyContinue
4348
Import-Module (Join-Path $PSScriptRoot "..\..\e2eTestHelper.psm1") -DisableNameChecking
4449

@@ -57,7 +62,6 @@ SetTokenAndRepository -github:$github -githubOwner $githubOwner -token $e2epat -
5762
# Create repository1
5863
CreateAlGoRepository `
5964
-github:$github `
60-
-linux:$linux `
6165
-template "https://github.com/$sourceRepo" `
6266
-repository $repository `
6367
-branch $branch

0 commit comments

Comments
 (0)