From 530663c6ce4a35a5f5393fa9a887ca440b1c27b4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:04:55 +0000 Subject: [PATCH 01/18] Initial plan From 8a356a1d2ef41ef4b3ea9ddecd32c454110af4fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:18:39 +0000 Subject: [PATCH 02/18] Extract PowerShell code from E2E.yaml into local actions Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .github/workflows/E2E.yaml | 358 +++++++----------- Actions/E2EAnalyze/E2EAnalyze.ps1 | 67 ++++ Actions/E2EAnalyze/action.yaml | 47 +++ .../E2ECalculateRepoName.ps1 | 12 + Actions/E2ECalculateRepoName/action.yaml | 30 ++ .../E2ECalculateTestParams.ps1 | 66 ++++ Actions/E2ECalculateTestParams/action.yaml | 71 ++++ Actions/E2ECheckSecrets/E2ECheckSecrets.ps1 | 56 +++ Actions/E2ECheckSecrets/action.yaml | 63 +++ Actions/E2ERunScenario/E2ERunScenario.ps1 | 54 +++ Actions/E2ERunScenario/action.yaml | 70 ++++ Actions/E2ERunTest/E2ERunTest.ps1 | 80 ++++ Actions/E2ERunTest/action.yaml | 90 +++++ .../E2ESetupRepositories.ps1 | 9 + Actions/E2ESetupRepositories/action.yaml | 44 +++ 15 files changed, 891 insertions(+), 226 deletions(-) create mode 100644 Actions/E2EAnalyze/E2EAnalyze.ps1 create mode 100644 Actions/E2EAnalyze/action.yaml create mode 100644 Actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 create mode 100644 Actions/E2ECalculateRepoName/action.yaml create mode 100644 Actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 create mode 100644 Actions/E2ECalculateTestParams/action.yaml create mode 100644 Actions/E2ECheckSecrets/E2ECheckSecrets.ps1 create mode 100644 Actions/E2ECheckSecrets/action.yaml create mode 100644 Actions/E2ERunScenario/E2ERunScenario.ps1 create mode 100644 Actions/E2ERunScenario/action.yaml create mode 100644 Actions/E2ERunTest/E2ERunTest.ps1 create mode 100644 Actions/E2ERunTest/action.yaml create mode 100644 Actions/E2ESetupRepositories/E2ESetupRepositories.ps1 create mode 100644 Actions/E2ESetupRepositories/action.yaml diff --git a/.github/workflows/E2E.yaml b/.github/workflows/E2E.yaml index 2f0e9430e4..a8a3089599 100644 --- a/.github/workflows/E2E.yaml +++ b/.github/workflows/E2E.yaml @@ -61,49 +61,16 @@ jobs: - name: Check secrets id: check - env: + uses: ./Actions/E2ECheckSecrets + with: + shell: pwsh githubOwner: ${{ github.event.inputs.githubOwner }} - run: | - $err = $false - if (('${{ vars.E2E_APP_ID }}' -eq '') -or ('${{ secrets.E2E_PRIVATE_KEY }}' -eq '')){ - Write-Host "::Error::In order to run end to end tests, you need a Secret called E2E_PRIVATE_KEY and a variable called E2E_APP_ID." - $err = $true - } - if ('${{ Secrets.ALGOAUTHAPP }}' -eq '') { - Write-Host "::Error::In order to run end to end tests, you need a Secret called ALGOAUTHAPP" - $err = $true - } - if ('${{ Secrets.adminCenterApiCredentials }}' -eq '') { - Write-Host "::Error::In order to run end to end tests, you need a Secret called adminCenterApiCredentials" - $err = $true - } - if ('${{ Secrets.E2E_GHPackagesPAT }}' -eq '') { - Write-Host "::Error::In order to run end to end tests, you need a secret called E2E_GHPackagesPAT" - $err = $true - } - if ('${{ Secrets.E2EAZURECREDENTIALS }}' -eq '') { - Write-Host "::Error::In order to run end to end tests, you need a secret called E2EAZURECREDENTIALS" - $err = $true - } - if ($err) { - exit 1 - } - $githubOwner = $ENV:githubOwner - $maxParallel = 99 - if (!($githubOwner)) { - $githubOwner = "$ENV:GITHUB_REPOSITORY_OWNER" - } - $orgmap = Get-Content -path (Join-Path "." "e2eTests\orgmap.json") -encoding UTF8 -raw | ConvertFrom-Json - if ($orgmap.PSObject.Properties.Name -eq $githubOwner) { - $githubOwner = $orgmap."$githubOwner" - } - if ($githubOwner -eq $ENV:GITHUB_REPOSITORY_OWNER) { - $maxParallel = 8 - } - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "maxParallel=$maxParallel" - Write-Host "maxParallel=$maxParallel" - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "githubOwner=$githubOwner" - Write-Host "githubOwner=$githubOwner" + e2eAppId: ${{ vars.E2E_APP_ID }} + e2ePrivateKey: ${{ secrets.E2E_PRIVATE_KEY }} + algoAuthApp: ${{ secrets.ALGOAUTHAPP }} + adminCenterApiCredentials: ${{ secrets.adminCenterApiCredentials }} + e2eGHPackagesPAT: ${{ secrets.E2E_GHPackagesPAT }} + e2eAzureCredentials: ${{ secrets.E2EAZURECREDENTIALS }} SetupRepositories: runs-on: [ ubuntu-latest ] @@ -132,12 +99,12 @@ jobs: - name: Setup Repositories id: setup - env: - _bcContainerHelperVersion: ${{ github.event.inputs.bcContainerHelperVersion }} - GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: | - $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - . (Join-Path "." "e2eTests/SetupRepositories.ps1") -githubOwner '${{ needs.Check.outputs.githubowner }}' -bcContainerHelperVersion $ENV:_bcContainerHelperVersion + uses: ./Actions/E2ESetupRepositories + with: + shell: pwsh + githubOwner: ${{ needs.Check.outputs.githubowner }} + bcContainerHelperVersion: ${{ github.event.inputs.bcContainerHelperVersion }} + token: ${{ steps.app-token.outputs.token }} Analyze: runs-on: [ ubuntu-latest ] @@ -167,70 +134,12 @@ jobs: - name: Analyze id: Analyze - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: | - $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - $modulePath = Join-Path "." "e2eTests\e2eTestHelper.psm1" -resolve - Import-Module $modulePath -DisableNameChecking - $maxParallel = [int]'${{ needs.Check.outputs.maxParallel }}' - - $publicTestruns = @{ - "max-parallel" = $maxParallel - "fail-fast" = $false - "matrix" = @{ - "include" = @() - } - } - $privateTestruns = @{ - "max-parallel" = $maxParallel - "fail-fast" = $false - "matrix" = @{ - "include" = @() - } - } - @('appSourceApp','PTE') | ForEach-Object { - $type = $_ - @('linux','windows') | ForEach-Object { - $os = $_ - @('multiProject','singleProject') | ForEach-Object { - $style = $_ - $publicTestruns.matrix.include += @{ "type" = $type; "os" = $os; "style" = $style; "Compiler" = "Container" } - $privateTestruns.matrix.include += @{ "type" = $type; "os" = $os; "style" = $style; "Compiler" = "Container" } - if ($type -eq "PTE") { - # Run end 2 end tests using CompilerFolder with Windows+Linux and single/multiproject - $publicTestruns.matrix.include += @{ "type" = $type; "os" = $os; "style" = $style; "Compiler" = "CompilerFolder" } - } - } - } - } - $publicTestrunsJson = $publicTestruns | ConvertTo-Json -depth 99 -compress - $privateTestrunsJson = $privateTestruns | ConvertTo-Json -depth 99 -compress - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "publictestruns=$publicTestrunsJson" - Write-Host "publictestruns=$publicTestrunsJson" - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "privatetestruns=$privateTestrunsJson" - Write-Host "privatetestruns=$privateTestrunsJson" - - $releases = @(gh release list --repo microsoft/AL-Go | ForEach-Object { $_.split("`t")[0] }) | Where-Object { [Version]($_.trimStart('v')) -ge [Version]("$env:TestUpgradesFromVersion".TrimStart('v')) } - $releasesJson = @{ - "matrix" = @{ - "include" = @($releases | ForEach-Object { @{ "Release" = $_; "type" = 'appSourceApp' }; @{ "Release" = $_; "type" = 'PTE' } } ) - }; - "max-parallel" = $maxParallel - "fail-fast" = $false - } | ConvertTo-Json -depth 99 -compress - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "releases=$releasesJson" - Write-Host "releases=$releasesJson" - - $scenariosJson = @{ - "matrix" = @{ - "include" = @(Get-ChildItem -path (Join-Path $ENV:GITHUB_WORKSPACE "e2eTests/scenarios/*/runtest.ps1") | ForEach-Object { @{ "Scenario" = $_.Directory.Name } } ) - }; - "max-parallel" = $maxParallel - "fail-fast" = $false - } | ConvertTo-Json -depth 99 -compress - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "scenarios=$scenariosJson" - Write-Host "scenarios=$scenariosJson" + uses: ./Actions/E2EAnalyze + with: + shell: pwsh + maxParallel: ${{ needs.Check.outputs.maxParallel }} + testUpgradesFromVersion: ${{ env.TestUpgradesFromVersion }} + token: ${{ steps.app-token.outputs.token }} ScenariosOnWindows: runs-on: [ windows-latest ] @@ -250,24 +159,27 @@ jobs: - name: Calculate parameters id: calculateParams - run: | - $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - $reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()) - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName=$repoName" - Write-Host "repoName=$repoName" - Write-Host "Repo URL: https://github.com/${{ needs.Check.outputs.githubowner }}/$repoName" + uses: ./Actions/E2ECalculateRepoName + with: + shell: pwsh + githubOwner: ${{ needs.Check.outputs.githubowner }} - name: Run test on Windows - run: | - try { - . (Join-Path "." "e2eTests/scenarios/${{ matrix.scenario }}/runtest.ps1") -github -githubOwner '${{ needs.Check.outputs.githubowner }}' -repoName '${{ steps.calculateParams.outputs.repoName }}' -e2eAppId '${{ vars.E2E_APP_ID }}' -e2eAppKey '${{ secrets.E2E_PRIVATE_KEY }}' -algoauthapp '${{ Secrets.ALGOAUTHAPP }}' -pteTemplate '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }}' -appSourceTemplate '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.appSourceAppRepo }}' -adminCenterApiCredentials '${{ Secrets.adminCenterApiCredentials }}' -azureCredentials '${{ Secrets.E2EAzureCredentials }}' -githubPackagesToken '${{ Secrets.E2E_GHPackagesPAT }}' - } - catch { - Write-Host $_.Exception.Message - Write-Host $_.ScriptStackTrace - Write-Host "::Error::$($_.Exception.Message)" - $host.SetShouldExit(1) - } + uses: ./Actions/E2ERunScenario + with: + shell: pwsh + scenario: ${{ matrix.scenario }} + linux: false + githubOwner: ${{ needs.Check.outputs.githubowner }} + repoName: ${{ steps.calculateParams.outputs.repoName }} + e2eAppId: ${{ vars.E2E_APP_ID }} + e2eAppKey: ${{ secrets.E2E_PRIVATE_KEY }} + algoAuthApp: ${{ secrets.ALGOAUTHAPP }} + pteTemplate: ${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }} + appSourceTemplate: ${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.appSourceAppRepo }} + adminCenterApiCredentials: ${{ secrets.adminCenterApiCredentials }} + azureCredentials: ${{ secrets.E2EAzureCredentials }} + githubPackagesToken: ${{ secrets.E2E_GHPackagesPAT }} ScenariosOnLinux: runs-on: [ windows-latest ] @@ -287,24 +199,27 @@ jobs: - name: Calculate parameters id: calculateParams - run: | - $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - $reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()) - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName=$repoName" - Write-Host "repoName=$repoName" - Write-Host "Repo URL: https://github.com/${{ needs.Check.outputs.githubowner }}/$repoName" + uses: ./Actions/E2ECalculateRepoName + with: + shell: pwsh + githubOwner: ${{ needs.Check.outputs.githubowner }} - name: Run tests - run: | - try { - . (Join-Path "." "e2eTests/scenarios/${{ matrix.scenario }}/runtest.ps1") -github -linux -githubOwner '${{ needs.Check.outputs.githubowner }}' -repoName '${{ steps.calculateParams.outputs.repoName }}' -e2eAppId '${{ vars.E2E_APP_ID }}' -e2eAppKey '${{ secrets.E2E_PRIVATE_KEY }}' -algoauthapp '${{ Secrets.ALGOAUTHAPP }}' -pteTemplate '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }}' -appSourceTemplate '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.appSourceAppRepo }}' -adminCenterApiCredentials '${{ Secrets.adminCenterApiCredentials }}' -azureCredentials '${{ Secrets.E2EAzureCredentials }}' -githubPackagesToken '${{ Secrets.E2E_GHPackagesPAT }}' - } - catch { - Write-Host $_.Exception.Message - Write-Host $_.ScriptStackTrace - Write-Host "::Error::$($_.Exception.Message)" - $host.SetShouldExit(1) - } + uses: ./Actions/E2ERunScenario + with: + shell: pwsh + scenario: ${{ matrix.scenario }} + linux: true + githubOwner: ${{ needs.Check.outputs.githubowner }} + repoName: ${{ steps.calculateParams.outputs.repoName }} + e2eAppId: ${{ vars.E2E_APP_ID }} + e2eAppKey: ${{ secrets.E2E_PRIVATE_KEY }} + algoAuthApp: ${{ secrets.ALGOAUTHAPP }} + pteTemplate: ${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }} + appSourceTemplate: ${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.appSourceAppRepo }} + adminCenterApiCredentials: ${{ secrets.adminCenterApiCredentials }} + azureCredentials: ${{ secrets.E2EAzureCredentials }} + githubPackagesToken: ${{ secrets.E2E_GHPackagesPAT }} TestAlGoPublic: runs-on: [ ubuntu-latest ] @@ -324,36 +239,34 @@ jobs: - name: Calculate parameters id: calculateParams - run: | - $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - $adminCenterApiCredentials = '' - if ('${{ matrix.type }}' -eq 'PTE' -and '${{ matrix.style }}' -eq 'singleProject' -and '${{ matrix.os }}' -eq 'windows') { - $adminCenterApiCredentials = '${{ Secrets.adminCenterApiCredentials }}' - } - if ('${{ matrix.type }}' -eq 'appSourceApp') { - $template = '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.appSourceAppRepo }}' - } - else { - $template = '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }}' - } - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials='$adminCenterApiCredentials'" - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "template='$template'" - $reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()) - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'" - Write-Host "repoName='$repoName'" - Write-Host "Repo URL: https://github.com/${{ needs.Check.outputs.githubowner }}/$repoName" + uses: ./Actions/E2ECalculateTestParams + with: + shell: pwsh + githubOwner: ${{ needs.Check.outputs.githubowner }} + matrixType: ${{ matrix.type }} + matrixStyle: ${{ matrix.style }} + matrixOs: ${{ matrix.os }} + adminCenterApiCredentialsSecret: ${{ secrets.adminCenterApiCredentials }} + appSourceAppRepo: ${{ needs.SetupRepositories.outputs.appSourceAppRepo }} + perTenantExtensionRepo: ${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }} - name: Run tests - run: | - try { - . (Join-Path "." "e2eTests/Test-AL-Go.ps1") -github -githubOwner '${{ needs.Check.outputs.githubowner }}' -repoName ${{ steps.calculateParams.outputs.repoName }} -e2eAppId '${{ vars.E2E_APP_ID }}' -e2eAppKey '${{ secrets.E2E_PRIVATE_KEY }}' -algoauthapp '${{ Secrets.ALGOAUTHAPP }}' -template ${{ steps.calculateParams.outputs.template }} -adminCenterApiCredentials ${{ steps.calculateParams.outputs.adminCenterApiCredentials }} -multiProject:('${{ matrix.style }}' -eq 'multiProject') -appSource:('${{ matrix.type }}' -eq 'appSourceApp') -linux:('${{ matrix.os }}' -eq 'linux') -useCompilerFolder:('${{ matrix.Compiler }}' -eq 'CompilerFolder') - } - catch { - Write-Host $_.Exception.Message - Write-Host $_.ScriptStackTrace - Write-Host "::Error::$($_.Exception.Message)" - $host.SetShouldExit(1) - } + uses: ./Actions/E2ERunTest + with: + shell: pwsh + testType: test + private: false + githubOwner: ${{ needs.Check.outputs.githubowner }} + repoName: ${{ steps.calculateParams.outputs.repoName }} + e2eAppId: ${{ vars.E2E_APP_ID }} + e2eAppKey: ${{ secrets.E2E_PRIVATE_KEY }} + algoAuthApp: ${{ secrets.ALGOAUTHAPP }} + template: ${{ steps.calculateParams.outputs.template }} + adminCenterApiCredentials: ${{ steps.calculateParams.outputs.adminCenterApiCredentials }} + multiProject: ${{ matrix.style == 'multiProject' }} + appSource: ${{ matrix.type == 'appSourceApp' }} + linux: ${{ matrix.os == 'linux' }} + useCompilerFolder: ${{ matrix.Compiler == 'CompilerFolder' }} TestAlGoPrivate: runs-on: [ ubuntu-latest ] @@ -373,36 +286,34 @@ jobs: - name: Calculate parameters id: calculateParams - run: | - $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - $adminCenterApiCredentials = '' - if ('${{ matrix.type }}' -eq 'PTE' -and '${{ matrix.style }}' -eq 'singleProject' -and '${{ matrix.os }}' -eq 'windows') { - $adminCenterApiCredentials = '${{ Secrets.adminCenterApiCredentials }}' - } - if ('${{ matrix.type }}' -eq 'appSourceApp') { - $template = '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.appSourceAppRepo }}' - } - else { - $template = '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }}' - } - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials='$adminCenterApiCredentials'" - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "template='$template'" - $reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()) - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'" - Write-Host "repoName='$repoName'" - Write-Host "Repo URL: https://github.com/${{ needs.Check.outputs.githubowner }}/$repoName" + uses: ./Actions/E2ECalculateTestParams + with: + shell: pwsh + githubOwner: ${{ needs.Check.outputs.githubowner }} + matrixType: ${{ matrix.type }} + matrixStyle: ${{ matrix.style }} + matrixOs: ${{ matrix.os }} + adminCenterApiCredentialsSecret: ${{ secrets.adminCenterApiCredentials }} + appSourceAppRepo: ${{ needs.SetupRepositories.outputs.appSourceAppRepo }} + perTenantExtensionRepo: ${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }} - name: Run tests - run: | - try { - . (Join-Path "." "e2eTests/Test-AL-Go.ps1") -private -github -githubOwner '${{ needs.Check.outputs.githubowner }}' -repoName ${{ steps.calculateParams.outputs.repoName }} -e2eAppId '${{ vars.E2E_APP_ID }}' -e2eAppKey '${{ secrets.E2E_PRIVATE_KEY }}' -algoauthapp '${{ Secrets.ALGOAUTHAPP }}' -template ${{ steps.calculateParams.outputs.template }} -adminCenterApiCredentials ${{ steps.calculateParams.outputs.adminCenterApiCredentials }} -multiProject:('${{ matrix.style }}' -eq 'multiProject') -appSource:('${{ matrix.type }}' -eq 'appSourceApp') -linux:('${{ matrix.os }}' -eq 'linux') -useCompilerFolder:('${{ matrix.Compiler }}' -eq 'CompilerFolder') - } - catch { - Write-Host $_.Exception.Message - Write-Host $_.ScriptStackTrace - Write-Host "::Error::$($_.Exception.Message)" - $host.SetShouldExit(1) - } + uses: ./Actions/E2ERunTest + with: + shell: pwsh + testType: test + private: true + githubOwner: ${{ needs.Check.outputs.githubowner }} + repoName: ${{ steps.calculateParams.outputs.repoName }} + e2eAppId: ${{ vars.E2E_APP_ID }} + e2eAppKey: ${{ secrets.E2E_PRIVATE_KEY }} + algoAuthApp: ${{ secrets.ALGOAUTHAPP }} + template: ${{ steps.calculateParams.outputs.template }} + adminCenterApiCredentials: ${{ steps.calculateParams.outputs.adminCenterApiCredentials }} + multiProject: ${{ matrix.style == 'multiProject' }} + appSource: ${{ matrix.type == 'appSourceApp' }} + linux: ${{ matrix.os == 'linux' }} + useCompilerFolder: ${{ matrix.Compiler == 'CompilerFolder' }} TestAlGoUpgrade: runs-on: [ ubuntu-latest ] @@ -422,31 +333,26 @@ jobs: - name: Calculate parameters id: calculateParams - run: | - $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - if ('${{ matrix.type }}' -eq 'appSourceApp') { - $template = '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.appSourceAppRepo }}' - $contentPath = 'appsourceapp' - } - else { - $template = '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }}' - $contentPath = 'pte' - } - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "template='$template'" - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "contentPath='$contentPath'" - $reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()) - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'" - Write-Host "repoName='$repoName'" - Write-Host "Repo URL: https://github.com/${{ needs.Check.outputs.githubowner }}/$repoName" + uses: ./Actions/E2ECalculateTestParams + with: + shell: pwsh + githubOwner: ${{ needs.Check.outputs.githubowner }} + matrixType: ${{ matrix.type }} + appSourceAppRepo: ${{ needs.SetupRepositories.outputs.appSourceAppRepo }} + perTenantExtensionRepo: ${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }} + contentPath: ${{ matrix.type == 'appSourceApp' && 'appsourceapp' || 'pte' }} - name: Run tests - run: | - try { - . (Join-Path "." "e2eTests/Test-AL-Go-Upgrade.ps1") -github -githubOwner '${{ needs.Check.outputs.githubowner }}' -repoName ${{ steps.calculateParams.outputs.repoName }} -e2eAppId '${{ vars.E2E_APP_ID }}' -e2eAppKey '${{ secrets.E2E_PRIVATE_KEY }}' -algoauthapp '${{ Secrets.ALGOAUTHAPP }}' -template ${{ steps.calculateParams.outputs.template }} -appSource:('${{ matrix.type }}' -eq 'appSourceApp') -release '${{ matrix.release }}' -contentPath ${{ steps.calculateParams.outputs.contentPath }} - } - catch { - Write-Host $_.Exception.Message - Write-Host $_.ScriptStackTrace - Write-Host "::Error::$($_.Exception.Message)" - $host.SetShouldExit(1) - } + uses: ./Actions/E2ERunTest + with: + shell: pwsh + testType: upgrade + githubOwner: ${{ needs.Check.outputs.githubowner }} + repoName: ${{ steps.calculateParams.outputs.repoName }} + e2eAppId: ${{ vars.E2E_APP_ID }} + e2eAppKey: ${{ secrets.E2E_PRIVATE_KEY }} + algoAuthApp: ${{ secrets.ALGOAUTHAPP }} + template: ${{ steps.calculateParams.outputs.template }} + appSource: ${{ matrix.type == 'appSourceApp' }} + release: ${{ matrix.release }} + contentPath: ${{ steps.calculateParams.outputs.contentPath }} diff --git a/Actions/E2EAnalyze/E2EAnalyze.ps1 b/Actions/E2EAnalyze/E2EAnalyze.ps1 new file mode 100644 index 0000000000..4bdc9e97cc --- /dev/null +++ b/Actions/E2EAnalyze/E2EAnalyze.ps1 @@ -0,0 +1,67 @@ +Param( + [Parameter(HelpMessage = "Maximum parallel jobs", Mandatory = $true)] + [int] $maxParallel, + [Parameter(HelpMessage = "Test upgrades from version", Mandatory = $false)] + [string] $testUpgradesFromVersion = 'v5.0' +) + +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +$modulePath = Join-Path "." "e2eTests\e2eTestHelper.psm1" -resolve +Import-Module $modulePath -DisableNameChecking + +$publicTestruns = @{ + "max-parallel" = $maxParallel + "fail-fast" = $false + "matrix" = @{ + "include" = @() + } +} +$privateTestruns = @{ + "max-parallel" = $maxParallel + "fail-fast" = $false + "matrix" = @{ + "include" = @() + } +} +@('appSourceApp','PTE') | ForEach-Object { + $type = $_ + @('linux','windows') | ForEach-Object { + $os = $_ + @('multiProject','singleProject') | ForEach-Object { + $style = $_ + $publicTestruns.matrix.include += @{ "type" = $type; "os" = $os; "style" = $style; "Compiler" = "Container" } + $privateTestruns.matrix.include += @{ "type" = $type; "os" = $os; "style" = $style; "Compiler" = "Container" } + if ($type -eq "PTE") { + # Run end 2 end tests using CompilerFolder with Windows+Linux and single/multiproject + $publicTestruns.matrix.include += @{ "type" = $type; "os" = $os; "style" = $style; "Compiler" = "CompilerFolder" } + } + } + } +} +$publicTestrunsJson = $publicTestruns | ConvertTo-Json -depth 99 -compress +$privateTestrunsJson = $privateTestruns | ConvertTo-Json -depth 99 -compress +Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "publictestruns=$publicTestrunsJson" +Write-Host "publictestruns=$publicTestrunsJson" +Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "privatetestruns=$privateTestrunsJson" +Write-Host "privatetestruns=$privateTestrunsJson" + +$releases = @(gh release list --repo microsoft/AL-Go | ForEach-Object { $_.split("`t")[0] }) | Where-Object { [Version]($_.trimStart('v')) -ge [Version]($testUpgradesFromVersion.TrimStart('v')) } +$releasesJson = @{ + "matrix" = @{ + "include" = @($releases | ForEach-Object { @{ "Release" = $_; "type" = 'appSourceApp' }; @{ "Release" = $_; "type" = 'PTE' } } ) + }; + "max-parallel" = $maxParallel + "fail-fast" = $false +} | ConvertTo-Json -depth 99 -compress +Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "releases=$releasesJson" +Write-Host "releases=$releasesJson" + +$scenariosJson = @{ + "matrix" = @{ + "include" = @(Get-ChildItem -path (Join-Path $ENV:GITHUB_WORKSPACE "e2eTests/scenarios/*/runtest.ps1") | ForEach-Object { @{ "Scenario" = $_.Directory.Name } } ) + }; + "max-parallel" = $maxParallel + "fail-fast" = $false +} | ConvertTo-Json -depth 99 -compress +Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "scenarios=$scenariosJson" +Write-Host "scenarios=$scenariosJson" diff --git a/Actions/E2EAnalyze/action.yaml b/Actions/E2EAnalyze/action.yaml new file mode 100644 index 0000000000..c19ef1100d --- /dev/null +++ b/Actions/E2EAnalyze/action.yaml @@ -0,0 +1,47 @@ +name: E2E Analyze +author: Microsoft Corporation +inputs: + shell: + description: Shell in which you want to run the action (powershell or pwsh) + required: false + default: powershell + maxParallel: + description: Maximum parallel jobs + required: true + testUpgradesFromVersion: + description: Test upgrades from version + required: false + default: 'v5.0' + token: + description: GitHub token with permissions to read releases + required: true +outputs: + publictestruns: + description: Public test runs matrix + value: ${{ steps.run.outputs.publictestruns }} + privatetestruns: + description: Private test runs matrix + value: ${{ steps.run.outputs.privatetestruns }} + releases: + description: Releases matrix + value: ${{ steps.run.outputs.releases }} + scenarios: + description: Scenarios matrix + value: ${{ steps.run.outputs.scenarios }} +runs: + using: composite + steps: + - name: run + id: run + shell: ${{ inputs.shell }} + env: + _maxParallel: ${{ inputs.maxParallel }} + _testUpgradesFromVersion: ${{ inputs.testUpgradesFromVersion }} + GH_TOKEN: ${{ inputs.token }} + run: | + ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2EAnalyze" -Action { + ${{ github.action_path }}/E2EAnalyze.ps1 -maxParallel ([int]$ENV:_maxParallel) -testUpgradesFromVersion $ENV:_testUpgradesFromVersion + } +branding: + icon: activity + color: blue diff --git a/Actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 b/Actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 new file mode 100644 index 0000000000..14380de66e --- /dev/null +++ b/Actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 @@ -0,0 +1,12 @@ +Param( + [Parameter(HelpMessage = "GitHub owner for test repositories", Mandatory = $false)] + [string] $githubOwner = '' +) + +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +$reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()) +Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName=$repoName" +Write-Host "repoName=$repoName" +if ($githubOwner) { + Write-Host "Repo URL: https://github.com/$githubOwner/$repoName" +} diff --git a/Actions/E2ECalculateRepoName/action.yaml b/Actions/E2ECalculateRepoName/action.yaml new file mode 100644 index 0000000000..904d89a628 --- /dev/null +++ b/Actions/E2ECalculateRepoName/action.yaml @@ -0,0 +1,30 @@ +name: E2E Calculate Repo Name +author: Microsoft Corporation +inputs: + shell: + description: Shell in which you want to run the action (powershell or pwsh) + required: false + default: powershell + githubOwner: + description: GitHub owner for test repositories (optional, for logging purposes) + required: false + default: '' +outputs: + repoName: + description: Generated repository name + value: ${{ steps.run.outputs.repoName }} +runs: + using: composite + steps: + - name: run + id: run + shell: ${{ inputs.shell }} + env: + _githubOwner: ${{ inputs.githubOwner }} + run: | + ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ECalculateRepoName" -Action { + ${{ github.action_path }}/E2ECalculateRepoName.ps1 -githubOwner $ENV:_githubOwner + } +branding: + icon: hash + color: blue diff --git a/Actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 b/Actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 new file mode 100644 index 0000000000..dd93608c2f --- /dev/null +++ b/Actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 @@ -0,0 +1,66 @@ +Param( + [Parameter(HelpMessage = "GitHub owner for test repositories", Mandatory = $true)] + [string] $githubOwner, + [Parameter(HelpMessage = "Matrix type (PTE or appSourceApp)", Mandatory = $false)] + [string] $matrixType = '', + [Parameter(HelpMessage = "Matrix style (singleProject or multiProject)", Mandatory = $false)] + [string] $matrixStyle = '', + [Parameter(HelpMessage = "Matrix OS (windows or linux)", Mandatory = $false)] + [string] $matrixOs = '', + [Parameter(HelpMessage = "Admin center API credentials secret", Mandatory = $false)] + [string] $adminCenterApiCredentialsSecret = '', + [Parameter(HelpMessage = "AppSource app repository template", Mandatory = $true)] + [string] $appSourceAppRepo, + [Parameter(HelpMessage = "Per-tenant extension repository template", Mandatory = $true)] + [string] $perTenantExtensionRepo, + [Parameter(HelpMessage = "Content path (for upgrade tests)", Mandatory = $false)] + [string] $contentPath = '' +) + +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + +# Calculate adminCenterApiCredentials +$adminCenterApiCredentials = '' +if ($matrixType -eq 'PTE' -and $matrixStyle -eq 'singleProject' -and $matrixOs -eq 'windows') { + $adminCenterApiCredentials = $adminCenterApiCredentialsSecret +} + +# Calculate template +$template = '' +if ($matrixType -eq 'appSourceApp') { + $template = "$githubOwner/$appSourceAppRepo" +} +elseif ($matrixType -eq 'PTE') { + $template = "$githubOwner/$perTenantExtensionRepo" +} +elseif ($matrixType) { + # For upgrade tests or other scenarios + if ($matrixType -eq 'appSourceApp') { + $template = "$githubOwner/$appSourceAppRepo" + } + else { + $template = "$githubOwner/$perTenantExtensionRepo" + } +} + +# Add outputs +if ($adminCenterApiCredentials) { + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials='$adminCenterApiCredentials'" +} +else { + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials=''" +} + +if ($template) { + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "template='$template'" +} + +if ($contentPath) { + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "contentPath='$contentPath'" +} + +# Generate repo name +$reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()) +Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'" +Write-Host "repoName='$repoName'" +Write-Host "Repo URL: https://github.com/$githubOwner/$repoName" diff --git a/Actions/E2ECalculateTestParams/action.yaml b/Actions/E2ECalculateTestParams/action.yaml new file mode 100644 index 0000000000..c135bdcfee --- /dev/null +++ b/Actions/E2ECalculateTestParams/action.yaml @@ -0,0 +1,71 @@ +name: E2E Calculate Test Parameters +author: Microsoft Corporation +inputs: + shell: + description: Shell in which you want to run the action (powershell or pwsh) + required: false + default: powershell + githubOwner: + description: GitHub owner for test repositories + required: true + matrixType: + description: Matrix type (PTE or appSourceApp) + required: false + default: '' + matrixStyle: + description: Matrix style (singleProject or multiProject) + required: false + default: '' + matrixOs: + description: Matrix OS (windows or linux) + required: false + default: '' + adminCenterApiCredentialsSecret: + description: Admin center API credentials secret + required: false + default: '' + appSourceAppRepo: + description: AppSource app repository template + required: true + perTenantExtensionRepo: + description: Per-tenant extension repository template + required: true + contentPath: + description: Content path (for upgrade tests) + required: false + default: '' +outputs: + adminCenterApiCredentials: + description: Calculated admin center API credentials + value: ${{ steps.run.outputs.adminCenterApiCredentials }} + template: + description: Calculated template repository + value: ${{ steps.run.outputs.template }} + repoName: + description: Generated repository name + value: ${{ steps.run.outputs.repoName }} + contentPath: + description: Content path (for upgrade tests) + value: ${{ steps.run.outputs.contentPath }} +runs: + using: composite + steps: + - name: run + id: run + shell: ${{ inputs.shell }} + env: + _githubOwner: ${{ inputs.githubOwner }} + _matrixType: ${{ inputs.matrixType }} + _matrixStyle: ${{ inputs.matrixStyle }} + _matrixOs: ${{ inputs.matrixOs }} + _adminCenterApiCredentialsSecret: ${{ inputs.adminCenterApiCredentialsSecret }} + _appSourceAppRepo: ${{ inputs.appSourceAppRepo }} + _perTenantExtensionRepo: ${{ inputs.perTenantExtensionRepo }} + _contentPath: ${{ inputs.contentPath }} + run: | + ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ECalculateTestParams" -Action { + ${{ github.action_path }}/E2ECalculateTestParams.ps1 -githubOwner $ENV:_githubOwner -matrixType $ENV:_matrixType -matrixStyle $ENV:_matrixStyle -matrixOs $ENV:_matrixOs -adminCenterApiCredentialsSecret $ENV:_adminCenterApiCredentialsSecret -appSourceAppRepo $ENV:_appSourceAppRepo -perTenantExtensionRepo $ENV:_perTenantExtensionRepo -contentPath $ENV:_contentPath + } +branding: + icon: settings + color: blue diff --git a/Actions/E2ECheckSecrets/E2ECheckSecrets.ps1 b/Actions/E2ECheckSecrets/E2ECheckSecrets.ps1 new file mode 100644 index 0000000000..acaa96c032 --- /dev/null +++ b/Actions/E2ECheckSecrets/E2ECheckSecrets.ps1 @@ -0,0 +1,56 @@ +Param( + [Parameter(HelpMessage = "GitHub owner (defaults to current repository owner)", Mandatory = $false)] + [string] $githubOwner = '', + [Parameter(HelpMessage = "E2E_APP_ID variable value", Mandatory = $false)] + [string] $e2eAppId = '', + [Parameter(HelpMessage = "E2E_PRIVATE_KEY secret value", Mandatory = $false)] + [string] $e2ePrivateKey = '', + [Parameter(HelpMessage = "ALGOAUTHAPP secret value", Mandatory = $false)] + [string] $algoAuthApp = '', + [Parameter(HelpMessage = "adminCenterApiCredentials secret value", Mandatory = $false)] + [string] $adminCenterApiCredentials = '', + [Parameter(HelpMessage = "E2E_GHPackagesPAT secret value", Mandatory = $false)] + [string] $e2eGHPackagesPAT = '', + [Parameter(HelpMessage = "E2EAZURECREDENTIALS secret value", Mandatory = $false)] + [string] $e2eAzureCredentials = '' +) + +$err = $false +if (($e2eAppId -eq '') -or ($e2ePrivateKey -eq '')){ + Write-Host "::Error::In order to run end to end tests, you need a Secret called E2E_PRIVATE_KEY and a variable called E2E_APP_ID." + $err = $true +} +if ($algoAuthApp -eq '') { + Write-Host "::Error::In order to run end to end tests, you need a Secret called ALGOAUTHAPP" + $err = $true +} +if ($adminCenterApiCredentials -eq '') { + Write-Host "::Error::In order to run end to end tests, you need a Secret called adminCenterApiCredentials" + $err = $true +} +if ($e2eGHPackagesPAT -eq '') { + Write-Host "::Error::In order to run end to end tests, you need a secret called E2E_GHPackagesPAT" + $err = $true +} +if ($e2eAzureCredentials -eq '') { + Write-Host "::Error::In order to run end to end tests, you need a secret called E2EAZURECREDENTIALS" + $err = $true +} +if ($err) { + exit 1 +} +$maxParallel = 99 +if (!($githubOwner)) { + $githubOwner = "$ENV:GITHUB_REPOSITORY_OWNER" +} +$orgmap = Get-Content -path (Join-Path "." "e2eTests\orgmap.json") -encoding UTF8 -raw | ConvertFrom-Json +if ($orgmap.PSObject.Properties.Name -eq $githubOwner) { + $githubOwner = $orgmap."$githubOwner" +} +if ($githubOwner -eq $ENV:GITHUB_REPOSITORY_OWNER) { + $maxParallel = 8 +} +Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "maxParallel=$maxParallel" +Write-Host "maxParallel=$maxParallel" +Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "githubOwner=$githubOwner" +Write-Host "githubOwner=$githubOwner" diff --git a/Actions/E2ECheckSecrets/action.yaml b/Actions/E2ECheckSecrets/action.yaml new file mode 100644 index 0000000000..c92439dda4 --- /dev/null +++ b/Actions/E2ECheckSecrets/action.yaml @@ -0,0 +1,63 @@ +name: E2E Check Secrets +author: Microsoft Corporation +inputs: + shell: + description: Shell in which you want to run the action (powershell or pwsh) + required: false + default: powershell + githubOwner: + description: GitHub owner (defaults to current repository owner) + required: false + default: '' + e2eAppId: + description: E2E_APP_ID variable value + required: false + default: '' + e2ePrivateKey: + description: E2E_PRIVATE_KEY secret value + required: false + default: '' + algoAuthApp: + description: ALGOAUTHAPP secret value + required: false + default: '' + adminCenterApiCredentials: + description: adminCenterApiCredentials secret value + required: false + default: '' + e2eGHPackagesPAT: + description: E2E_GHPackagesPAT secret value + required: false + default: '' + e2eAzureCredentials: + description: E2EAZURECREDENTIALS secret value + required: false + default: '' +outputs: + maxParallel: + description: Maximum number of parallel jobs + value: ${{ steps.run.outputs.maxParallel }} + githubOwner: + description: GitHub owner for test repositories + value: ${{ steps.run.outputs.githubOwner }} +runs: + using: composite + steps: + - name: run + id: run + shell: ${{ inputs.shell }} + env: + _githubOwner: ${{ inputs.githubOwner }} + _e2eAppId: ${{ inputs.e2eAppId }} + _e2ePrivateKey: ${{ inputs.e2ePrivateKey }} + _algoAuthApp: ${{ inputs.algoAuthApp }} + _adminCenterApiCredentials: ${{ inputs.adminCenterApiCredentials }} + _e2eGHPackagesPAT: ${{ inputs.e2eGHPackagesPAT }} + _e2eAzureCredentials: ${{ inputs.e2eAzureCredentials }} + run: | + ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ECheckSecrets" -Action { + ${{ github.action_path }}/E2ECheckSecrets.ps1 -githubOwner $ENV:_githubOwner -e2eAppId $ENV:_e2eAppId -e2ePrivateKey $ENV:_e2ePrivateKey -algoAuthApp $ENV:_algoAuthApp -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -e2eGHPackagesPAT $ENV:_e2eGHPackagesPAT -e2eAzureCredentials $ENV:_e2eAzureCredentials + } +branding: + icon: check-circle + color: blue diff --git a/Actions/E2ERunScenario/E2ERunScenario.ps1 b/Actions/E2ERunScenario/E2ERunScenario.ps1 new file mode 100644 index 0000000000..67192bb81b --- /dev/null +++ b/Actions/E2ERunScenario/E2ERunScenario.ps1 @@ -0,0 +1,54 @@ +Param( + [Parameter(HelpMessage = "Scenario name", Mandatory = $true)] + [string] $scenario, + [Parameter(HelpMessage = "Run on Linux", Mandatory = $false)] + [bool] $linux = $false, + [Parameter(HelpMessage = "GitHub owner", Mandatory = $true)] + [string] $githubOwner, + [Parameter(HelpMessage = "Repository name", Mandatory = $true)] + [string] $repoName, + [Parameter(HelpMessage = "E2E App ID", Mandatory = $true)] + [string] $e2eAppId, + [Parameter(HelpMessage = "E2E App Key", Mandatory = $true)] + [string] $e2eAppKey, + [Parameter(HelpMessage = "ALGO Auth App", Mandatory = $true)] + [string] $algoAuthApp, + [Parameter(HelpMessage = "PTE template", Mandatory = $true)] + [string] $pteTemplate, + [Parameter(HelpMessage = "AppSource template", Mandatory = $true)] + [string] $appSourceTemplate, + [Parameter(HelpMessage = "Admin center API credentials", Mandatory = $true)] + [string] $adminCenterApiCredentials, + [Parameter(HelpMessage = "Azure credentials", Mandatory = $true)] + [string] $azureCredentials, + [Parameter(HelpMessage = "GitHub packages token", Mandatory = $true)] + [string] $githubPackagesToken +) + +try { + $params = @{ + 'github' = $true + 'githubOwner' = $githubOwner + 'repoName' = $repoName + 'e2eAppId' = $e2eAppId + 'e2eAppKey' = $e2eAppKey + 'algoauthapp' = $algoAuthApp + 'pteTemplate' = $pteTemplate + 'appSourceTemplate' = $appSourceTemplate + 'adminCenterApiCredentials' = $adminCenterApiCredentials + 'azureCredentials' = $azureCredentials + 'githubPackagesToken' = $githubPackagesToken + } + + if ($linux) { + $params['linux'] = $true + } + + . (Join-Path "." "e2eTests/scenarios/$scenario/runtest.ps1") @params +} +catch { + Write-Host $_.Exception.Message + Write-Host $_.ScriptStackTrace + Write-Host "::Error::$($_.Exception.Message)" + $host.SetShouldExit(1) +} diff --git a/Actions/E2ERunScenario/action.yaml b/Actions/E2ERunScenario/action.yaml new file mode 100644 index 0000000000..d6dc0aad36 --- /dev/null +++ b/Actions/E2ERunScenario/action.yaml @@ -0,0 +1,70 @@ +name: E2E Run Scenario +author: Microsoft Corporation +inputs: + shell: + description: Shell in which you want to run the action (powershell or pwsh) + required: false + default: powershell + scenario: + description: Scenario name + required: true + linux: + description: Run on Linux + required: false + default: 'false' + githubOwner: + description: GitHub owner + required: true + repoName: + description: Repository name + required: true + e2eAppId: + description: E2E App ID + required: true + e2eAppKey: + description: E2E App Key + required: true + algoAuthApp: + description: ALGO Auth App + required: true + pteTemplate: + description: PTE template + required: true + appSourceTemplate: + description: AppSource template + required: true + adminCenterApiCredentials: + description: Admin center API credentials + required: true + azureCredentials: + description: Azure credentials + required: true + githubPackagesToken: + description: GitHub packages token + required: true +runs: + using: composite + steps: + - name: run + id: run + shell: ${{ inputs.shell }} + env: + _scenario: ${{ inputs.scenario }} + _linux: ${{ inputs.linux }} + _githubOwner: ${{ inputs.githubOwner }} + _repoName: ${{ inputs.repoName }} + _e2eAppId: ${{ inputs.e2eAppId }} + _e2eAppKey: ${{ inputs.e2eAppKey }} + _algoAuthApp: ${{ inputs.algoAuthApp }} + _pteTemplate: ${{ inputs.pteTemplate }} + _appSourceTemplate: ${{ inputs.appSourceTemplate }} + _adminCenterApiCredentials: ${{ inputs.adminCenterApiCredentials }} + _azureCredentials: ${{ inputs.azureCredentials }} + _githubPackagesToken: ${{ inputs.githubPackagesToken }} + run: | + ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ERunScenario" -Action { + ${{ github.action_path }}/E2ERunScenario.ps1 -scenario $ENV:_scenario -linux ($ENV:_linux -eq 'true') -githubOwner $ENV:_githubOwner -repoName $ENV:_repoName -e2eAppId $ENV:_e2eAppId -e2eAppKey $ENV:_e2eAppKey -algoAuthApp $ENV:_algoAuthApp -pteTemplate $ENV:_pteTemplate -appSourceTemplate $ENV:_appSourceTemplate -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -azureCredentials $ENV:_azureCredentials -githubPackagesToken $ENV:_githubPackagesToken + } +branding: + icon: play + color: blue diff --git a/Actions/E2ERunTest/E2ERunTest.ps1 b/Actions/E2ERunTest/E2ERunTest.ps1 new file mode 100644 index 0000000000..2e834ec344 --- /dev/null +++ b/Actions/E2ERunTest/E2ERunTest.ps1 @@ -0,0 +1,80 @@ +Param( + [Parameter(HelpMessage = "Test type (test or upgrade)", Mandatory = $false)] + [ValidateSet('test', 'upgrade')] + [string] $testType = 'test', + [Parameter(HelpMessage = "Private repository", Mandatory = $false)] + [bool] $private = $false, + [Parameter(HelpMessage = "GitHub owner", Mandatory = $true)] + [string] $githubOwner, + [Parameter(HelpMessage = "Repository name", Mandatory = $true)] + [string] $repoName, + [Parameter(HelpMessage = "E2E App ID", Mandatory = $true)] + [string] $e2eAppId, + [Parameter(HelpMessage = "E2E App Key", Mandatory = $true)] + [string] $e2eAppKey, + [Parameter(HelpMessage = "ALGO Auth App", Mandatory = $true)] + [string] $algoAuthApp, + [Parameter(HelpMessage = "Template", Mandatory = $true)] + [string] $template, + [Parameter(HelpMessage = "Admin center API credentials", Mandatory = $false)] + [string] $adminCenterApiCredentials = '', + [Parameter(HelpMessage = "Multi-project", Mandatory = $false)] + [bool] $multiProject = $false, + [Parameter(HelpMessage = "AppSource app", Mandatory = $false)] + [bool] $appSource = $false, + [Parameter(HelpMessage = "Linux", Mandatory = $false)] + [bool] $linux = $false, + [Parameter(HelpMessage = "Use compiler folder", Mandatory = $false)] + [bool] $useCompilerFolder = $false, + [Parameter(HelpMessage = "Release (for upgrade tests)", Mandatory = $false)] + [string] $release = '', + [Parameter(HelpMessage = "Content path (for upgrade tests)", Mandatory = $false)] + [string] $contentPath = '' +) + +try { + if ($testType -eq 'upgrade') { + $params = @{ + 'github' = $true + 'githubOwner' = $githubOwner + 'repoName' = $repoName + 'e2eAppId' = $e2eAppId + 'e2eAppKey' = $e2eAppKey + 'algoauthapp' = $algoAuthApp + 'template' = $template + 'appSource' = $appSource + 'release' = $release + 'contentPath' = $contentPath + } + + . (Join-Path "." "e2eTests/Test-AL-Go-Upgrade.ps1") @params + } + else { + $params = @{ + 'github' = $true + 'githubOwner' = $githubOwner + 'repoName' = $repoName + 'e2eAppId' = $e2eAppId + 'e2eAppKey' = $e2eAppKey + 'algoauthapp' = $algoAuthApp + 'template' = $template + 'adminCenterApiCredentials' = $adminCenterApiCredentials + 'multiProject' = $multiProject + 'appSource' = $appSource + 'linux' = $linux + 'useCompilerFolder' = $useCompilerFolder + } + + if ($private) { + $params['private'] = $true + } + + . (Join-Path "." "e2eTests/Test-AL-Go.ps1") @params + } +} +catch { + Write-Host $_.Exception.Message + Write-Host $_.ScriptStackTrace + Write-Host "::Error::$($_.Exception.Message)" + $host.SetShouldExit(1) +} diff --git a/Actions/E2ERunTest/action.yaml b/Actions/E2ERunTest/action.yaml new file mode 100644 index 0000000000..ac6b096e3a --- /dev/null +++ b/Actions/E2ERunTest/action.yaml @@ -0,0 +1,90 @@ +name: E2E Run Test +author: Microsoft Corporation +inputs: + shell: + description: Shell in which you want to run the action (powershell or pwsh) + required: false + default: powershell + testType: + description: Test type (test or upgrade) + required: false + default: 'test' + private: + description: Private repository + required: false + default: 'false' + githubOwner: + description: GitHub owner + required: true + repoName: + description: Repository name + required: true + e2eAppId: + description: E2E App ID + required: true + e2eAppKey: + description: E2E App Key + required: true + algoAuthApp: + description: ALGO Auth App + required: true + template: + description: Template + required: true + adminCenterApiCredentials: + description: Admin center API credentials + required: false + default: '' + multiProject: + description: Multi-project + required: false + default: 'false' + appSource: + description: AppSource app + required: false + default: 'false' + linux: + description: Linux + required: false + default: 'false' + useCompilerFolder: + description: Use compiler folder + required: false + default: 'false' + release: + description: Release (for upgrade tests) + required: false + default: '' + contentPath: + description: Content path (for upgrade tests) + required: false + default: '' +runs: + using: composite + steps: + - name: run + id: run + shell: ${{ inputs.shell }} + env: + _testType: ${{ inputs.testType }} + _private: ${{ inputs.private }} + _githubOwner: ${{ inputs.githubOwner }} + _repoName: ${{ inputs.repoName }} + _e2eAppId: ${{ inputs.e2eAppId }} + _e2eAppKey: ${{ inputs.e2eAppKey }} + _algoAuthApp: ${{ inputs.algoAuthApp }} + _template: ${{ inputs.template }} + _adminCenterApiCredentials: ${{ inputs.adminCenterApiCredentials }} + _multiProject: ${{ inputs.multiProject }} + _appSource: ${{ inputs.appSource }} + _linux: ${{ inputs.linux }} + _useCompilerFolder: ${{ inputs.useCompilerFolder }} + _release: ${{ inputs.release }} + _contentPath: ${{ inputs.contentPath }} + run: | + ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ERunTest" -Action { + ${{ github.action_path }}/E2ERunTest.ps1 -testType $ENV:_testType -private ($ENV:_private -eq 'true') -githubOwner $ENV:_githubOwner -repoName $ENV:_repoName -e2eAppId $ENV:_e2eAppId -e2eAppKey $ENV:_e2eAppKey -algoAuthApp $ENV:_algoAuthApp -template $ENV:_template -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -multiProject ($ENV:_multiProject -eq 'true') -appSource ($ENV:_appSource -eq 'true') -linux ($ENV:_linux -eq 'true') -useCompilerFolder ($ENV:_useCompilerFolder -eq 'true') -release $ENV:_release -contentPath $ENV:_contentPath + } +branding: + icon: check-square + color: blue diff --git a/Actions/E2ESetupRepositories/E2ESetupRepositories.ps1 b/Actions/E2ESetupRepositories/E2ESetupRepositories.ps1 new file mode 100644 index 0000000000..6fae796895 --- /dev/null +++ b/Actions/E2ESetupRepositories/E2ESetupRepositories.ps1 @@ -0,0 +1,9 @@ +Param( + [Parameter(HelpMessage = "GitHub owner for test repositories", Mandatory = $true)] + [string] $githubOwner, + [Parameter(HelpMessage = "BcContainerHelper version", Mandatory = $false)] + [string] $bcContainerHelperVersion = '' +) + +$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +. (Join-Path "." "e2eTests/SetupRepositories.ps1") -githubOwner $githubOwner -bcContainerHelperVersion $bcContainerHelperVersion diff --git a/Actions/E2ESetupRepositories/action.yaml b/Actions/E2ESetupRepositories/action.yaml new file mode 100644 index 0000000000..e10df4c2f2 --- /dev/null +++ b/Actions/E2ESetupRepositories/action.yaml @@ -0,0 +1,44 @@ +name: E2E Setup Repositories +author: Microsoft Corporation +inputs: + shell: + description: Shell in which you want to run the action (powershell or pwsh) + required: false + default: powershell + githubOwner: + description: GitHub owner for test repositories + required: true + bcContainerHelperVersion: + description: BcContainerHelper version + required: false + default: '' + token: + description: GitHub token with permissions to create repositories + required: true +outputs: + actionsRepo: + description: Actions repository name + value: ${{ steps.run.outputs.actionsRepo }} + perTenantExtensionRepo: + description: Per-tenant extension repository name + value: ${{ steps.run.outputs.perTenantExtensionRepo }} + appSourceAppRepo: + description: AppSource app repository name + value: ${{ steps.run.outputs.appSourceAppRepo }} +runs: + using: composite + steps: + - name: run + id: run + shell: ${{ inputs.shell }} + env: + _githubOwner: ${{ inputs.githubOwner }} + _bcContainerHelperVersion: ${{ inputs.bcContainerHelperVersion }} + GH_TOKEN: ${{ inputs.token }} + run: | + ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ESetupRepositories" -Action { + ${{ github.action_path }}/E2ESetupRepositories.ps1 -githubOwner $ENV:_githubOwner -bcContainerHelperVersion $ENV:_bcContainerHelperVersion + } +branding: + icon: git-branch + color: blue From e97149e292e15ff887b8a081841139780508c284 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:24:40 +0000 Subject: [PATCH 03/18] Add README documentation for new E2E actions Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- Actions/E2EAnalyze/README.md | 16 ++++++++++++++++ Actions/E2ECalculateRepoName/README.md | 11 +++++++++++ Actions/E2ECalculateTestParams/README.md | 21 +++++++++++++++++++++ Actions/E2ECheckSecrets/README.md | 18 ++++++++++++++++++ Actions/E2ERunScenario/README.md | 18 ++++++++++++++++++ Actions/E2ERunTest/README.md | 21 +++++++++++++++++++++ Actions/E2ESetupRepositories/README.md | 15 +++++++++++++++ 7 files changed, 120 insertions(+) create mode 100644 Actions/E2EAnalyze/README.md create mode 100644 Actions/E2ECalculateRepoName/README.md create mode 100644 Actions/E2ECalculateTestParams/README.md create mode 100644 Actions/E2ECheckSecrets/README.md create mode 100644 Actions/E2ERunScenario/README.md create mode 100644 Actions/E2ERunTest/README.md create mode 100644 Actions/E2ESetupRepositories/README.md diff --git a/Actions/E2EAnalyze/README.md b/Actions/E2EAnalyze/README.md new file mode 100644 index 0000000000..5061596d97 --- /dev/null +++ b/Actions/E2EAnalyze/README.md @@ -0,0 +1,16 @@ +# E2E Analyze + +Analyzes and generates test matrices for E2E testing including public/private test runs, releases, and scenarios. + +## Inputs + +- `maxParallel`: Maximum parallel jobs +- `testUpgradesFromVersion`: Test upgrades from version (default: 'v5.0') +- `token`: GitHub token with permissions to read releases + +## Outputs + +- `publictestruns`: Public test runs matrix +- `privatetestruns`: Private test runs matrix +- `releases`: Releases matrix +- `scenarios`: Scenarios matrix diff --git a/Actions/E2ECalculateRepoName/README.md b/Actions/E2ECalculateRepoName/README.md new file mode 100644 index 0000000000..28be7d2702 --- /dev/null +++ b/Actions/E2ECalculateRepoName/README.md @@ -0,0 +1,11 @@ +# E2E Calculate Repo Name + +Generates a random repository name for E2E testing. + +## Inputs + +- `githubOwner`: GitHub owner for test repositories (optional, for logging purposes) + +## Outputs + +- `repoName`: Generated repository name diff --git a/Actions/E2ECalculateTestParams/README.md b/Actions/E2ECalculateTestParams/README.md new file mode 100644 index 0000000000..e9a5aadf30 --- /dev/null +++ b/Actions/E2ECalculateTestParams/README.md @@ -0,0 +1,21 @@ +# E2E Calculate Test Parameters + +Calculates test parameters including template repository, admin center credentials, and repository name based on matrix configuration. + +## Inputs + +- `githubOwner`: GitHub owner for test repositories +- `matrixType`: Matrix type (PTE or appSourceApp) +- `matrixStyle`: Matrix style (singleProject or multiProject) +- `matrixOs`: Matrix OS (windows or linux) +- `adminCenterApiCredentialsSecret`: Admin center API credentials secret +- `appSourceAppRepo`: AppSource app repository template +- `perTenantExtensionRepo`: Per-tenant extension repository template +- `contentPath`: Content path (for upgrade tests) + +## Outputs + +- `adminCenterApiCredentials`: Calculated admin center API credentials +- `template`: Calculated template repository +- `repoName`: Generated repository name +- `contentPath`: Content path (for upgrade tests) diff --git a/Actions/E2ECheckSecrets/README.md b/Actions/E2ECheckSecrets/README.md new file mode 100644 index 0000000000..23111251c8 --- /dev/null +++ b/Actions/E2ECheckSecrets/README.md @@ -0,0 +1,18 @@ +# E2E Check Secrets + +Validates that all required secrets and variables are configured for E2E testing. + +## Inputs + +- `githubOwner`: GitHub owner (defaults to current repository owner) +- `e2eAppId`: E2E_APP_ID variable value +- `e2ePrivateKey`: E2E_PRIVATE_KEY secret value +- `algoAuthApp`: ALGOAUTHAPP secret value +- `adminCenterApiCredentials`: adminCenterApiCredentials secret value +- `e2eGHPackagesPAT`: E2E_GHPackagesPAT secret value +- `e2eAzureCredentials`: E2EAZURECREDENTIALS secret value + +## Outputs + +- `maxParallel`: Maximum number of parallel jobs +- `githubOwner`: GitHub owner for test repositories diff --git a/Actions/E2ERunScenario/README.md b/Actions/E2ERunScenario/README.md new file mode 100644 index 0000000000..16b474c434 --- /dev/null +++ b/Actions/E2ERunScenario/README.md @@ -0,0 +1,18 @@ +# E2E Run Scenario + +Runs E2E scenario tests by executing scenario-specific test scripts. + +## Inputs + +- `scenario`: Scenario name +- `linux`: Run on Linux (default: false) +- `githubOwner`: GitHub owner +- `repoName`: Repository name +- `e2eAppId`: E2E App ID +- `e2eAppKey`: E2E App Key +- `algoAuthApp`: ALGO Auth App +- `pteTemplate`: PTE template +- `appSourceTemplate`: AppSource template +- `adminCenterApiCredentials`: Admin center API credentials +- `azureCredentials`: Azure credentials +- `githubPackagesToken`: GitHub packages token diff --git a/Actions/E2ERunTest/README.md b/Actions/E2ERunTest/README.md new file mode 100644 index 0000000000..6fe298599c --- /dev/null +++ b/Actions/E2ERunTest/README.md @@ -0,0 +1,21 @@ +# E2E Run Test + +Runs E2E tests by executing Test-AL-Go.ps1 or Test-AL-Go-Upgrade.ps1 scripts. + +## Inputs + +- `testType`: Test type (test or upgrade, default: test) +- `private`: Private repository (default: false) +- `githubOwner`: GitHub owner +- `repoName`: Repository name +- `e2eAppId`: E2E App ID +- `e2eAppKey`: E2E App Key +- `algoAuthApp`: ALGO Auth App +- `template`: Template +- `adminCenterApiCredentials`: Admin center API credentials +- `multiProject`: Multi-project (default: false) +- `appSource`: AppSource app (default: false) +- `linux`: Linux (default: false) +- `useCompilerFolder`: Use compiler folder (default: false) +- `release`: Release (for upgrade tests) +- `contentPath`: Content path (for upgrade tests) diff --git a/Actions/E2ESetupRepositories/README.md b/Actions/E2ESetupRepositories/README.md new file mode 100644 index 0000000000..9cc433495a --- /dev/null +++ b/Actions/E2ESetupRepositories/README.md @@ -0,0 +1,15 @@ +# E2E Setup Repositories + +Sets up test repositories for E2E testing by calling the SetupRepositories.ps1 script. + +## Inputs + +- `githubOwner`: GitHub owner for test repositories +- `bcContainerHelperVersion`: BcContainerHelper version +- `token`: GitHub token with permissions to create repositories + +## Outputs + +- `actionsRepo`: Actions repository name +- `perTenantExtensionRepo`: Per-tenant extension repository name +- `appSourceAppRepo`: AppSource app repository name From 0d2f4047714a64e50c6ab9d22171bdfcb6f34357 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 19 Nov 2025 07:24:04 +0000 Subject: [PATCH 04/18] Move E2E actions from Actions/ to .github/actions/ Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .../actions}/E2EAnalyze/E2EAnalyze.ps1 | 0 .../actions}/E2EAnalyze/README.md | 0 .../actions}/E2EAnalyze/action.yaml | 2 +- .../E2ECalculateRepoName.ps1 | 0 .../actions}/E2ECalculateRepoName/README.md | 0 .../actions}/E2ECalculateRepoName/action.yaml | 2 +- .../E2ECalculateTestParams.ps1 | 0 .../actions}/E2ECalculateTestParams/README.md | 0 .../E2ECalculateTestParams/action.yaml | 2 +- .../E2ECheckSecrets/E2ECheckSecrets.ps1 | 0 .../actions}/E2ECheckSecrets/README.md | 0 .../actions}/E2ECheckSecrets/action.yaml | 2 +- .../E2ERunScenario/E2ERunScenario.ps1 | 0 .../actions}/E2ERunScenario/README.md | 0 .../actions}/E2ERunScenario/action.yaml | 2 +- .../actions}/E2ERunTest/E2ERunTest.ps1 | 0 .../actions}/E2ERunTest/README.md | 0 .../actions}/E2ERunTest/action.yaml | 2 +- .../E2ESetupRepositories.ps1 | 0 .../actions}/E2ESetupRepositories/README.md | 0 .../actions}/E2ESetupRepositories/action.yaml | 2 +- .github/workflows/E2E.yaml | 26 +++++++++---------- 22 files changed, 20 insertions(+), 20 deletions(-) rename {Actions => .github/actions}/E2EAnalyze/E2EAnalyze.ps1 (100%) rename {Actions => .github/actions}/E2EAnalyze/README.md (100%) rename {Actions => .github/actions}/E2EAnalyze/action.yaml (92%) rename {Actions => .github/actions}/E2ECalculateRepoName/E2ECalculateRepoName.ps1 (100%) rename {Actions => .github/actions}/E2ECalculateRepoName/README.md (100%) rename {Actions => .github/actions}/E2ECalculateRepoName/action.yaml (86%) rename {Actions => .github/actions}/E2ECalculateTestParams/E2ECalculateTestParams.ps1 (100%) rename {Actions => .github/actions}/E2ECalculateTestParams/README.md (100%) rename {Actions => .github/actions}/E2ECalculateTestParams/action.yaml (95%) rename {Actions => .github/actions}/E2ECheckSecrets/E2ECheckSecrets.ps1 (100%) rename {Actions => .github/actions}/E2ECheckSecrets/README.md (100%) rename {Actions => .github/actions}/E2ECheckSecrets/action.yaml (94%) rename {Actions => .github/actions}/E2ERunScenario/E2ERunScenario.ps1 (100%) rename {Actions => .github/actions}/E2ERunScenario/README.md (100%) rename {Actions => .github/actions}/E2ERunScenario/action.yaml (95%) rename {Actions => .github/actions}/E2ERunTest/E2ERunTest.ps1 (100%) rename {Actions => .github/actions}/E2ERunTest/README.md (100%) rename {Actions => .github/actions}/E2ERunTest/action.yaml (96%) rename {Actions => .github/actions}/E2ESetupRepositories/E2ESetupRepositories.ps1 (100%) rename {Actions => .github/actions}/E2ESetupRepositories/README.md (100%) rename {Actions => .github/actions}/E2ESetupRepositories/action.yaml (91%) diff --git a/Actions/E2EAnalyze/E2EAnalyze.ps1 b/.github/actions/E2EAnalyze/E2EAnalyze.ps1 similarity index 100% rename from Actions/E2EAnalyze/E2EAnalyze.ps1 rename to .github/actions/E2EAnalyze/E2EAnalyze.ps1 diff --git a/Actions/E2EAnalyze/README.md b/.github/actions/E2EAnalyze/README.md similarity index 100% rename from Actions/E2EAnalyze/README.md rename to .github/actions/E2EAnalyze/README.md diff --git a/Actions/E2EAnalyze/action.yaml b/.github/actions/E2EAnalyze/action.yaml similarity index 92% rename from Actions/E2EAnalyze/action.yaml rename to .github/actions/E2EAnalyze/action.yaml index c19ef1100d..e7d1603f66 100644 --- a/Actions/E2EAnalyze/action.yaml +++ b/.github/actions/E2EAnalyze/action.yaml @@ -39,7 +39,7 @@ runs: _testUpgradesFromVersion: ${{ inputs.testUpgradesFromVersion }} GH_TOKEN: ${{ inputs.token }} run: | - ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2EAnalyze" -Action { + ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2EAnalyze" -Action { ${{ github.action_path }}/E2EAnalyze.ps1 -maxParallel ([int]$ENV:_maxParallel) -testUpgradesFromVersion $ENV:_testUpgradesFromVersion } branding: diff --git a/Actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 b/.github/actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 similarity index 100% rename from Actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 rename to .github/actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 diff --git a/Actions/E2ECalculateRepoName/README.md b/.github/actions/E2ECalculateRepoName/README.md similarity index 100% rename from Actions/E2ECalculateRepoName/README.md rename to .github/actions/E2ECalculateRepoName/README.md diff --git a/Actions/E2ECalculateRepoName/action.yaml b/.github/actions/E2ECalculateRepoName/action.yaml similarity index 86% rename from Actions/E2ECalculateRepoName/action.yaml rename to .github/actions/E2ECalculateRepoName/action.yaml index 904d89a628..2547285cc9 100644 --- a/Actions/E2ECalculateRepoName/action.yaml +++ b/.github/actions/E2ECalculateRepoName/action.yaml @@ -22,7 +22,7 @@ runs: env: _githubOwner: ${{ inputs.githubOwner }} run: | - ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ECalculateRepoName" -Action { + ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ECalculateRepoName" -Action { ${{ github.action_path }}/E2ECalculateRepoName.ps1 -githubOwner $ENV:_githubOwner } branding: diff --git a/Actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 b/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 similarity index 100% rename from Actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 rename to .github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 diff --git a/Actions/E2ECalculateTestParams/README.md b/.github/actions/E2ECalculateTestParams/README.md similarity index 100% rename from Actions/E2ECalculateTestParams/README.md rename to .github/actions/E2ECalculateTestParams/README.md diff --git a/Actions/E2ECalculateTestParams/action.yaml b/.github/actions/E2ECalculateTestParams/action.yaml similarity index 95% rename from Actions/E2ECalculateTestParams/action.yaml rename to .github/actions/E2ECalculateTestParams/action.yaml index c135bdcfee..66d2cc080f 100644 --- a/Actions/E2ECalculateTestParams/action.yaml +++ b/.github/actions/E2ECalculateTestParams/action.yaml @@ -63,7 +63,7 @@ runs: _perTenantExtensionRepo: ${{ inputs.perTenantExtensionRepo }} _contentPath: ${{ inputs.contentPath }} run: | - ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ECalculateTestParams" -Action { + ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ECalculateTestParams" -Action { ${{ github.action_path }}/E2ECalculateTestParams.ps1 -githubOwner $ENV:_githubOwner -matrixType $ENV:_matrixType -matrixStyle $ENV:_matrixStyle -matrixOs $ENV:_matrixOs -adminCenterApiCredentialsSecret $ENV:_adminCenterApiCredentialsSecret -appSourceAppRepo $ENV:_appSourceAppRepo -perTenantExtensionRepo $ENV:_perTenantExtensionRepo -contentPath $ENV:_contentPath } branding: diff --git a/Actions/E2ECheckSecrets/E2ECheckSecrets.ps1 b/.github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 similarity index 100% rename from Actions/E2ECheckSecrets/E2ECheckSecrets.ps1 rename to .github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 diff --git a/Actions/E2ECheckSecrets/README.md b/.github/actions/E2ECheckSecrets/README.md similarity index 100% rename from Actions/E2ECheckSecrets/README.md rename to .github/actions/E2ECheckSecrets/README.md diff --git a/Actions/E2ECheckSecrets/action.yaml b/.github/actions/E2ECheckSecrets/action.yaml similarity index 94% rename from Actions/E2ECheckSecrets/action.yaml rename to .github/actions/E2ECheckSecrets/action.yaml index c92439dda4..928356d833 100644 --- a/Actions/E2ECheckSecrets/action.yaml +++ b/.github/actions/E2ECheckSecrets/action.yaml @@ -55,7 +55,7 @@ runs: _e2eGHPackagesPAT: ${{ inputs.e2eGHPackagesPAT }} _e2eAzureCredentials: ${{ inputs.e2eAzureCredentials }} run: | - ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ECheckSecrets" -Action { + ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ECheckSecrets" -Action { ${{ github.action_path }}/E2ECheckSecrets.ps1 -githubOwner $ENV:_githubOwner -e2eAppId $ENV:_e2eAppId -e2ePrivateKey $ENV:_e2ePrivateKey -algoAuthApp $ENV:_algoAuthApp -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -e2eGHPackagesPAT $ENV:_e2eGHPackagesPAT -e2eAzureCredentials $ENV:_e2eAzureCredentials } branding: diff --git a/Actions/E2ERunScenario/E2ERunScenario.ps1 b/.github/actions/E2ERunScenario/E2ERunScenario.ps1 similarity index 100% rename from Actions/E2ERunScenario/E2ERunScenario.ps1 rename to .github/actions/E2ERunScenario/E2ERunScenario.ps1 diff --git a/Actions/E2ERunScenario/README.md b/.github/actions/E2ERunScenario/README.md similarity index 100% rename from Actions/E2ERunScenario/README.md rename to .github/actions/E2ERunScenario/README.md diff --git a/Actions/E2ERunScenario/action.yaml b/.github/actions/E2ERunScenario/action.yaml similarity index 95% rename from Actions/E2ERunScenario/action.yaml rename to .github/actions/E2ERunScenario/action.yaml index d6dc0aad36..7ad17f3133 100644 --- a/Actions/E2ERunScenario/action.yaml +++ b/.github/actions/E2ERunScenario/action.yaml @@ -62,7 +62,7 @@ runs: _azureCredentials: ${{ inputs.azureCredentials }} _githubPackagesToken: ${{ inputs.githubPackagesToken }} run: | - ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ERunScenario" -Action { + ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ERunScenario" -Action { ${{ github.action_path }}/E2ERunScenario.ps1 -scenario $ENV:_scenario -linux ($ENV:_linux -eq 'true') -githubOwner $ENV:_githubOwner -repoName $ENV:_repoName -e2eAppId $ENV:_e2eAppId -e2eAppKey $ENV:_e2eAppKey -algoAuthApp $ENV:_algoAuthApp -pteTemplate $ENV:_pteTemplate -appSourceTemplate $ENV:_appSourceTemplate -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -azureCredentials $ENV:_azureCredentials -githubPackagesToken $ENV:_githubPackagesToken } branding: diff --git a/Actions/E2ERunTest/E2ERunTest.ps1 b/.github/actions/E2ERunTest/E2ERunTest.ps1 similarity index 100% rename from Actions/E2ERunTest/E2ERunTest.ps1 rename to .github/actions/E2ERunTest/E2ERunTest.ps1 diff --git a/Actions/E2ERunTest/README.md b/.github/actions/E2ERunTest/README.md similarity index 100% rename from Actions/E2ERunTest/README.md rename to .github/actions/E2ERunTest/README.md diff --git a/Actions/E2ERunTest/action.yaml b/.github/actions/E2ERunTest/action.yaml similarity index 96% rename from Actions/E2ERunTest/action.yaml rename to .github/actions/E2ERunTest/action.yaml index ac6b096e3a..57e613c42a 100644 --- a/Actions/E2ERunTest/action.yaml +++ b/.github/actions/E2ERunTest/action.yaml @@ -82,7 +82,7 @@ runs: _release: ${{ inputs.release }} _contentPath: ${{ inputs.contentPath }} run: | - ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ERunTest" -Action { + ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ERunTest" -Action { ${{ github.action_path }}/E2ERunTest.ps1 -testType $ENV:_testType -private ($ENV:_private -eq 'true') -githubOwner $ENV:_githubOwner -repoName $ENV:_repoName -e2eAppId $ENV:_e2eAppId -e2eAppKey $ENV:_e2eAppKey -algoAuthApp $ENV:_algoAuthApp -template $ENV:_template -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -multiProject ($ENV:_multiProject -eq 'true') -appSource ($ENV:_appSource -eq 'true') -linux ($ENV:_linux -eq 'true') -useCompilerFolder ($ENV:_useCompilerFolder -eq 'true') -release $ENV:_release -contentPath $ENV:_contentPath } branding: diff --git a/Actions/E2ESetupRepositories/E2ESetupRepositories.ps1 b/.github/actions/E2ESetupRepositories/E2ESetupRepositories.ps1 similarity index 100% rename from Actions/E2ESetupRepositories/E2ESetupRepositories.ps1 rename to .github/actions/E2ESetupRepositories/E2ESetupRepositories.ps1 diff --git a/Actions/E2ESetupRepositories/README.md b/.github/actions/E2ESetupRepositories/README.md similarity index 100% rename from Actions/E2ESetupRepositories/README.md rename to .github/actions/E2ESetupRepositories/README.md diff --git a/Actions/E2ESetupRepositories/action.yaml b/.github/actions/E2ESetupRepositories/action.yaml similarity index 91% rename from Actions/E2ESetupRepositories/action.yaml rename to .github/actions/E2ESetupRepositories/action.yaml index e10df4c2f2..974f50ffaa 100644 --- a/Actions/E2ESetupRepositories/action.yaml +++ b/.github/actions/E2ESetupRepositories/action.yaml @@ -36,7 +36,7 @@ runs: _bcContainerHelperVersion: ${{ inputs.bcContainerHelperVersion }} GH_TOKEN: ${{ inputs.token }} run: | - ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "E2ESetupRepositories" -Action { + ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ESetupRepositories" -Action { ${{ github.action_path }}/E2ESetupRepositories.ps1 -githubOwner $ENV:_githubOwner -bcContainerHelperVersion $ENV:_bcContainerHelperVersion } branding: diff --git a/.github/workflows/E2E.yaml b/.github/workflows/E2E.yaml index a8a3089599..2f62da71b6 100644 --- a/.github/workflows/E2E.yaml +++ b/.github/workflows/E2E.yaml @@ -61,7 +61,7 @@ jobs: - name: Check secrets id: check - uses: ./Actions/E2ECheckSecrets + uses: ./.github/actions/E2ECheckSecrets with: shell: pwsh githubOwner: ${{ github.event.inputs.githubOwner }} @@ -99,7 +99,7 @@ jobs: - name: Setup Repositories id: setup - uses: ./Actions/E2ESetupRepositories + uses: ./.github/actions/E2ESetupRepositories with: shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} @@ -134,7 +134,7 @@ jobs: - name: Analyze id: Analyze - uses: ./Actions/E2EAnalyze + uses: ./.github/actions/E2EAnalyze with: shell: pwsh maxParallel: ${{ needs.Check.outputs.maxParallel }} @@ -159,13 +159,13 @@ jobs: - name: Calculate parameters id: calculateParams - uses: ./Actions/E2ECalculateRepoName + uses: ./.github/actions/E2ECalculateRepoName with: shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} - name: Run test on Windows - uses: ./Actions/E2ERunScenario + uses: ./.github/actions/E2ERunScenario with: shell: pwsh scenario: ${{ matrix.scenario }} @@ -199,13 +199,13 @@ jobs: - name: Calculate parameters id: calculateParams - uses: ./Actions/E2ECalculateRepoName + uses: ./.github/actions/E2ECalculateRepoName with: shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} - name: Run tests - uses: ./Actions/E2ERunScenario + uses: ./.github/actions/E2ERunScenario with: shell: pwsh scenario: ${{ matrix.scenario }} @@ -239,7 +239,7 @@ jobs: - name: Calculate parameters id: calculateParams - uses: ./Actions/E2ECalculateTestParams + uses: ./.github/actions/E2ECalculateTestParams with: shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} @@ -251,7 +251,7 @@ jobs: perTenantExtensionRepo: ${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }} - name: Run tests - uses: ./Actions/E2ERunTest + uses: ./.github/actions/E2ERunTest with: shell: pwsh testType: test @@ -286,7 +286,7 @@ jobs: - name: Calculate parameters id: calculateParams - uses: ./Actions/E2ECalculateTestParams + uses: ./.github/actions/E2ECalculateTestParams with: shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} @@ -298,7 +298,7 @@ jobs: perTenantExtensionRepo: ${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }} - name: Run tests - uses: ./Actions/E2ERunTest + uses: ./.github/actions/E2ERunTest with: shell: pwsh testType: test @@ -333,7 +333,7 @@ jobs: - name: Calculate parameters id: calculateParams - uses: ./Actions/E2ECalculateTestParams + uses: ./.github/actions/E2ECalculateTestParams with: shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} @@ -343,7 +343,7 @@ jobs: contentPath: ${{ matrix.type == 'appSourceApp' && 'appsourceapp' || 'pte' }} - name: Run tests - uses: ./Actions/E2ERunTest + uses: ./.github/actions/E2ERunTest with: shell: pwsh testType: upgrade From 7cbba2e3a1d1b588e2fd8c1707f2c30e1e570199 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 19 Nov 2025 09:29:58 +0000 Subject: [PATCH 05/18] Remove Invoke-AlGoAction.ps1 wrapper and call scripts directly Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .github/actions/E2EAnalyze/action.yaml | 4 +--- .github/actions/E2ECalculateRepoName/action.yaml | 4 +--- .github/actions/E2ECalculateTestParams/action.yaml | 4 +--- .github/actions/E2ECheckSecrets/action.yaml | 4 +--- .github/actions/E2ERunScenario/action.yaml | 4 +--- .github/actions/E2ERunTest/action.yaml | 4 +--- .github/actions/E2ESetupRepositories/action.yaml | 4 +--- 7 files changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/actions/E2EAnalyze/action.yaml b/.github/actions/E2EAnalyze/action.yaml index e7d1603f66..24c17b412c 100644 --- a/.github/actions/E2EAnalyze/action.yaml +++ b/.github/actions/E2EAnalyze/action.yaml @@ -39,9 +39,7 @@ runs: _testUpgradesFromVersion: ${{ inputs.testUpgradesFromVersion }} GH_TOKEN: ${{ inputs.token }} run: | - ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2EAnalyze" -Action { - ${{ github.action_path }}/E2EAnalyze.ps1 -maxParallel ([int]$ENV:_maxParallel) -testUpgradesFromVersion $ENV:_testUpgradesFromVersion - } + ${{ github.action_path }}/E2EAnalyze.ps1 -maxParallel ([int]$ENV:_maxParallel) -testUpgradesFromVersion $ENV:_testUpgradesFromVersion branding: icon: activity color: blue diff --git a/.github/actions/E2ECalculateRepoName/action.yaml b/.github/actions/E2ECalculateRepoName/action.yaml index 2547285cc9..392ec651f1 100644 --- a/.github/actions/E2ECalculateRepoName/action.yaml +++ b/.github/actions/E2ECalculateRepoName/action.yaml @@ -22,9 +22,7 @@ runs: env: _githubOwner: ${{ inputs.githubOwner }} run: | - ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ECalculateRepoName" -Action { - ${{ github.action_path }}/E2ECalculateRepoName.ps1 -githubOwner $ENV:_githubOwner - } + ${{ github.action_path }}/E2ECalculateRepoName.ps1 -githubOwner $ENV:_githubOwner branding: icon: hash color: blue diff --git a/.github/actions/E2ECalculateTestParams/action.yaml b/.github/actions/E2ECalculateTestParams/action.yaml index 66d2cc080f..1805ab1e45 100644 --- a/.github/actions/E2ECalculateTestParams/action.yaml +++ b/.github/actions/E2ECalculateTestParams/action.yaml @@ -63,9 +63,7 @@ runs: _perTenantExtensionRepo: ${{ inputs.perTenantExtensionRepo }} _contentPath: ${{ inputs.contentPath }} run: | - ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ECalculateTestParams" -Action { - ${{ github.action_path }}/E2ECalculateTestParams.ps1 -githubOwner $ENV:_githubOwner -matrixType $ENV:_matrixType -matrixStyle $ENV:_matrixStyle -matrixOs $ENV:_matrixOs -adminCenterApiCredentialsSecret $ENV:_adminCenterApiCredentialsSecret -appSourceAppRepo $ENV:_appSourceAppRepo -perTenantExtensionRepo $ENV:_perTenantExtensionRepo -contentPath $ENV:_contentPath - } + ${{ github.action_path }}/E2ECalculateTestParams.ps1 -githubOwner $ENV:_githubOwner -matrixType $ENV:_matrixType -matrixStyle $ENV:_matrixStyle -matrixOs $ENV:_matrixOs -adminCenterApiCredentialsSecret $ENV:_adminCenterApiCredentialsSecret -appSourceAppRepo $ENV:_appSourceAppRepo -perTenantExtensionRepo $ENV:_perTenantExtensionRepo -contentPath $ENV:_contentPath branding: icon: settings color: blue diff --git a/.github/actions/E2ECheckSecrets/action.yaml b/.github/actions/E2ECheckSecrets/action.yaml index 928356d833..5a127e4830 100644 --- a/.github/actions/E2ECheckSecrets/action.yaml +++ b/.github/actions/E2ECheckSecrets/action.yaml @@ -55,9 +55,7 @@ runs: _e2eGHPackagesPAT: ${{ inputs.e2eGHPackagesPAT }} _e2eAzureCredentials: ${{ inputs.e2eAzureCredentials }} run: | - ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ECheckSecrets" -Action { - ${{ github.action_path }}/E2ECheckSecrets.ps1 -githubOwner $ENV:_githubOwner -e2eAppId $ENV:_e2eAppId -e2ePrivateKey $ENV:_e2ePrivateKey -algoAuthApp $ENV:_algoAuthApp -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -e2eGHPackagesPAT $ENV:_e2eGHPackagesPAT -e2eAzureCredentials $ENV:_e2eAzureCredentials - } + ${{ github.action_path }}/E2ECheckSecrets.ps1 -githubOwner $ENV:_githubOwner -e2eAppId $ENV:_e2eAppId -e2ePrivateKey $ENV:_e2ePrivateKey -algoAuthApp $ENV:_algoAuthApp -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -e2eGHPackagesPAT $ENV:_e2eGHPackagesPAT -e2eAzureCredentials $ENV:_e2eAzureCredentials branding: icon: check-circle color: blue diff --git a/.github/actions/E2ERunScenario/action.yaml b/.github/actions/E2ERunScenario/action.yaml index 7ad17f3133..be1fca27a5 100644 --- a/.github/actions/E2ERunScenario/action.yaml +++ b/.github/actions/E2ERunScenario/action.yaml @@ -62,9 +62,7 @@ runs: _azureCredentials: ${{ inputs.azureCredentials }} _githubPackagesToken: ${{ inputs.githubPackagesToken }} run: | - ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ERunScenario" -Action { - ${{ github.action_path }}/E2ERunScenario.ps1 -scenario $ENV:_scenario -linux ($ENV:_linux -eq 'true') -githubOwner $ENV:_githubOwner -repoName $ENV:_repoName -e2eAppId $ENV:_e2eAppId -e2eAppKey $ENV:_e2eAppKey -algoAuthApp $ENV:_algoAuthApp -pteTemplate $ENV:_pteTemplate -appSourceTemplate $ENV:_appSourceTemplate -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -azureCredentials $ENV:_azureCredentials -githubPackagesToken $ENV:_githubPackagesToken - } + ${{ github.action_path }}/E2ERunScenario.ps1 -scenario $ENV:_scenario -linux ($ENV:_linux -eq 'true') -githubOwner $ENV:_githubOwner -repoName $ENV:_repoName -e2eAppId $ENV:_e2eAppId -e2eAppKey $ENV:_e2eAppKey -algoAuthApp $ENV:_algoAuthApp -pteTemplate $ENV:_pteTemplate -appSourceTemplate $ENV:_appSourceTemplate -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -azureCredentials $ENV:_azureCredentials -githubPackagesToken $ENV:_githubPackagesToken branding: icon: play color: blue diff --git a/.github/actions/E2ERunTest/action.yaml b/.github/actions/E2ERunTest/action.yaml index 57e613c42a..fb3c1800a7 100644 --- a/.github/actions/E2ERunTest/action.yaml +++ b/.github/actions/E2ERunTest/action.yaml @@ -82,9 +82,7 @@ runs: _release: ${{ inputs.release }} _contentPath: ${{ inputs.contentPath }} run: | - ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ERunTest" -Action { - ${{ github.action_path }}/E2ERunTest.ps1 -testType $ENV:_testType -private ($ENV:_private -eq 'true') -githubOwner $ENV:_githubOwner -repoName $ENV:_repoName -e2eAppId $ENV:_e2eAppId -e2eAppKey $ENV:_e2eAppKey -algoAuthApp $ENV:_algoAuthApp -template $ENV:_template -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -multiProject ($ENV:_multiProject -eq 'true') -appSource ($ENV:_appSource -eq 'true') -linux ($ENV:_linux -eq 'true') -useCompilerFolder ($ENV:_useCompilerFolder -eq 'true') -release $ENV:_release -contentPath $ENV:_contentPath - } + ${{ github.action_path }}/E2ERunTest.ps1 -testType $ENV:_testType -private ($ENV:_private -eq 'true') -githubOwner $ENV:_githubOwner -repoName $ENV:_repoName -e2eAppId $ENV:_e2eAppId -e2eAppKey $ENV:_e2eAppKey -algoAuthApp $ENV:_algoAuthApp -template $ENV:_template -adminCenterApiCredentials $ENV:_adminCenterApiCredentials -multiProject ($ENV:_multiProject -eq 'true') -appSource ($ENV:_appSource -eq 'true') -linux ($ENV:_linux -eq 'true') -useCompilerFolder ($ENV:_useCompilerFolder -eq 'true') -release $ENV:_release -contentPath $ENV:_contentPath branding: icon: check-square color: blue diff --git a/.github/actions/E2ESetupRepositories/action.yaml b/.github/actions/E2ESetupRepositories/action.yaml index 974f50ffaa..88110a0924 100644 --- a/.github/actions/E2ESetupRepositories/action.yaml +++ b/.github/actions/E2ESetupRepositories/action.yaml @@ -36,9 +36,7 @@ runs: _bcContainerHelperVersion: ${{ inputs.bcContainerHelperVersion }} GH_TOKEN: ${{ inputs.token }} run: | - ${{ github.action_path }}/../../../Actions/Invoke-AlGoAction.ps1 -ActionName "E2ESetupRepositories" -Action { - ${{ github.action_path }}/E2ESetupRepositories.ps1 -githubOwner $ENV:_githubOwner -bcContainerHelperVersion $ENV:_bcContainerHelperVersion - } + ${{ github.action_path }}/E2ESetupRepositories.ps1 -githubOwner $ENV:_githubOwner -bcContainerHelperVersion $ENV:_bcContainerHelperVersion branding: icon: git-branch color: blue From e6a2b0d3ba938c6176ebc6c223bba5165e80552d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 19 Nov 2025 11:44:32 +0000 Subject: [PATCH 06/18] Fix code scanning and pre-commit issues in E2E actions Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .github/actions/E2EAnalyze/E2EAnalyze.ps1 | 4 ++-- .../actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 | 2 +- .../E2ECalculateTestParams/E2ECalculateTestParams.ps1 | 2 +- .github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 | 6 ++++-- .github/actions/E2ERunScenario/E2ERunScenario.ps1 | 6 ++++-- .github/actions/E2ERunTest/E2ERunTest.ps1 | 8 +++++--- .../actions/E2ESetupRepositories/E2ESetupRepositories.ps1 | 2 +- 7 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/actions/E2EAnalyze/E2EAnalyze.ps1 b/.github/actions/E2EAnalyze/E2EAnalyze.ps1 index 4bdc9e97cc..3174c659bf 100644 --- a/.github/actions/E2EAnalyze/E2EAnalyze.ps1 +++ b/.github/actions/E2EAnalyze/E2EAnalyze.ps1 @@ -5,8 +5,8 @@ Param( [string] $testUpgradesFromVersion = 'v5.0' ) -$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 -$modulePath = Join-Path "." "e2eTests\e2eTestHelper.psm1" -resolve +$ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +$modulePath = Join-Path "." "e2eTests/e2eTestHelper.psm1" -resolve Import-Module $modulePath -DisableNameChecking $publicTestruns = @{ diff --git a/.github/actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 b/.github/actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 index 14380de66e..9c5c7bfa8d 100644 --- a/.github/actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 +++ b/.github/actions/E2ECalculateRepoName/E2ECalculateRepoName.ps1 @@ -3,7 +3,7 @@ Param( [string] $githubOwner = '' ) -$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +$ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 $reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()) Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName=$repoName" Write-Host "repoName=$repoName" diff --git a/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 b/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 index dd93608c2f..2f8d18f83e 100644 --- a/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 +++ b/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 @@ -17,7 +17,7 @@ Param( [string] $contentPath = '' ) -$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +$ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 # Calculate adminCenterApiCredentials $adminCenterApiCredentials = '' diff --git a/.github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 b/.github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 index acaa96c032..73fb0a44c5 100644 --- a/.github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 +++ b/.github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 @@ -15,6 +15,8 @@ Param( [string] $e2eAzureCredentials = '' ) +$ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + $err = $false if (($e2eAppId -eq '') -or ($e2ePrivateKey -eq '')){ Write-Host "::Error::In order to run end to end tests, you need a Secret called E2E_PRIVATE_KEY and a variable called E2E_APP_ID." @@ -41,9 +43,9 @@ if ($err) { } $maxParallel = 99 if (!($githubOwner)) { - $githubOwner = "$ENV:GITHUB_REPOSITORY_OWNER" + $githubOwner = $ENV:GITHUB_REPOSITORY_OWNER } -$orgmap = Get-Content -path (Join-Path "." "e2eTests\orgmap.json") -encoding UTF8 -raw | ConvertFrom-Json +$orgmap = Get-Content -path (Join-Path "." "e2eTests/orgmap.json") -encoding UTF8 -raw | ConvertFrom-Json if ($orgmap.PSObject.Properties.Name -eq $githubOwner) { $githubOwner = $orgmap."$githubOwner" } diff --git a/.github/actions/E2ERunScenario/E2ERunScenario.ps1 b/.github/actions/E2ERunScenario/E2ERunScenario.ps1 index 67192bb81b..77bd92beab 100644 --- a/.github/actions/E2ERunScenario/E2ERunScenario.ps1 +++ b/.github/actions/E2ERunScenario/E2ERunScenario.ps1 @@ -25,6 +25,8 @@ Param( [string] $githubPackagesToken ) +$ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + try { $params = @{ 'github' = $true @@ -39,11 +41,11 @@ try { 'azureCredentials' = $azureCredentials 'githubPackagesToken' = $githubPackagesToken } - + if ($linux) { $params['linux'] = $true } - + . (Join-Path "." "e2eTests/scenarios/$scenario/runtest.ps1") @params } catch { diff --git a/.github/actions/E2ERunTest/E2ERunTest.ps1 b/.github/actions/E2ERunTest/E2ERunTest.ps1 index 2e834ec344..ded44499e7 100644 --- a/.github/actions/E2ERunTest/E2ERunTest.ps1 +++ b/.github/actions/E2ERunTest/E2ERunTest.ps1 @@ -32,6 +32,8 @@ Param( [string] $contentPath = '' ) +$ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 + try { if ($testType -eq 'upgrade') { $params = @{ @@ -46,7 +48,7 @@ try { 'release' = $release 'contentPath' = $contentPath } - + . (Join-Path "." "e2eTests/Test-AL-Go-Upgrade.ps1") @params } else { @@ -64,11 +66,11 @@ try { 'linux' = $linux 'useCompilerFolder' = $useCompilerFolder } - + if ($private) { $params['private'] = $true } - + . (Join-Path "." "e2eTests/Test-AL-Go.ps1") @params } } diff --git a/.github/actions/E2ESetupRepositories/E2ESetupRepositories.ps1 b/.github/actions/E2ESetupRepositories/E2ESetupRepositories.ps1 index 6fae796895..9ccdd5b496 100644 --- a/.github/actions/E2ESetupRepositories/E2ESetupRepositories.ps1 +++ b/.github/actions/E2ESetupRepositories/E2ESetupRepositories.ps1 @@ -5,5 +5,5 @@ Param( [string] $bcContainerHelperVersion = '' ) -$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 +$ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 . (Join-Path "." "e2eTests/SetupRepositories.ps1") -githubOwner $githubOwner -bcContainerHelperVersion $bcContainerHelperVersion From 32499d0e330c267578a82ad4b12f2c1ed7268f3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 19 Nov 2025 15:03:06 +0000 Subject: [PATCH 07/18] Remove invalid shell inputs and fix duplicate contentPath logic Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .../E2ECalculateTestParams.ps1 | 9 +++++---- .github/workflows/E2E.yaml | 14 -------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 b/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 index 2f8d18f83e..f468ad7737 100644 --- a/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 +++ b/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 @@ -33,13 +33,14 @@ if ($matrixType -eq 'appSourceApp') { elseif ($matrixType -eq 'PTE') { $template = "$githubOwner/$perTenantExtensionRepo" } -elseif ($matrixType) { - # For upgrade tests or other scenarios + +# Calculate contentPath if not provided +if (-not $contentPath -and $matrixType) { if ($matrixType -eq 'appSourceApp') { - $template = "$githubOwner/$appSourceAppRepo" + $contentPath = 'appsourceapp' } else { - $template = "$githubOwner/$perTenantExtensionRepo" + $contentPath = 'pte' } } diff --git a/.github/workflows/E2E.yaml b/.github/workflows/E2E.yaml index 2f62da71b6..1e3e9b6e06 100644 --- a/.github/workflows/E2E.yaml +++ b/.github/workflows/E2E.yaml @@ -63,7 +63,6 @@ jobs: id: check uses: ./.github/actions/E2ECheckSecrets with: - shell: pwsh githubOwner: ${{ github.event.inputs.githubOwner }} e2eAppId: ${{ vars.E2E_APP_ID }} e2ePrivateKey: ${{ secrets.E2E_PRIVATE_KEY }} @@ -101,7 +100,6 @@ jobs: id: setup uses: ./.github/actions/E2ESetupRepositories with: - shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} bcContainerHelperVersion: ${{ github.event.inputs.bcContainerHelperVersion }} token: ${{ steps.app-token.outputs.token }} @@ -136,7 +134,6 @@ jobs: id: Analyze uses: ./.github/actions/E2EAnalyze with: - shell: pwsh maxParallel: ${{ needs.Check.outputs.maxParallel }} testUpgradesFromVersion: ${{ env.TestUpgradesFromVersion }} token: ${{ steps.app-token.outputs.token }} @@ -161,13 +158,11 @@ jobs: id: calculateParams uses: ./.github/actions/E2ECalculateRepoName with: - shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} - name: Run test on Windows uses: ./.github/actions/E2ERunScenario with: - shell: pwsh scenario: ${{ matrix.scenario }} linux: false githubOwner: ${{ needs.Check.outputs.githubowner }} @@ -201,13 +196,11 @@ jobs: id: calculateParams uses: ./.github/actions/E2ECalculateRepoName with: - shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} - name: Run tests uses: ./.github/actions/E2ERunScenario with: - shell: pwsh scenario: ${{ matrix.scenario }} linux: true githubOwner: ${{ needs.Check.outputs.githubowner }} @@ -241,7 +234,6 @@ jobs: id: calculateParams uses: ./.github/actions/E2ECalculateTestParams with: - shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} matrixType: ${{ matrix.type }} matrixStyle: ${{ matrix.style }} @@ -253,7 +245,6 @@ jobs: - name: Run tests uses: ./.github/actions/E2ERunTest with: - shell: pwsh testType: test private: false githubOwner: ${{ needs.Check.outputs.githubowner }} @@ -288,7 +279,6 @@ jobs: id: calculateParams uses: ./.github/actions/E2ECalculateTestParams with: - shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} matrixType: ${{ matrix.type }} matrixStyle: ${{ matrix.style }} @@ -300,7 +290,6 @@ jobs: - name: Run tests uses: ./.github/actions/E2ERunTest with: - shell: pwsh testType: test private: true githubOwner: ${{ needs.Check.outputs.githubowner }} @@ -335,17 +324,14 @@ jobs: id: calculateParams uses: ./.github/actions/E2ECalculateTestParams with: - shell: pwsh githubOwner: ${{ needs.Check.outputs.githubowner }} matrixType: ${{ matrix.type }} appSourceAppRepo: ${{ needs.SetupRepositories.outputs.appSourceAppRepo }} perTenantExtensionRepo: ${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }} - contentPath: ${{ matrix.type == 'appSourceApp' && 'appsourceapp' || 'pte' }} - name: Run tests uses: ./.github/actions/E2ERunTest with: - shell: pwsh testType: upgrade githubOwner: ${{ needs.Check.outputs.githubowner }} repoName: ${{ steps.calculateParams.outputs.repoName }} From da92269392f13cbec33aa44b52d38b60f7b1e720 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 25 Nov 2025 09:40:32 +0000 Subject: [PATCH 08/18] Fix E2E failure: change default shell from 'powershell' to 'pwsh' for Linux compatibility Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .github/actions/E2EAnalyze/action.yaml | 2 +- .github/actions/E2ECalculateRepoName/action.yaml | 2 +- .github/actions/E2ECalculateTestParams/action.yaml | 2 +- .github/actions/E2ECheckSecrets/action.yaml | 2 +- .github/actions/E2ERunScenario/action.yaml | 2 +- .github/actions/E2ERunTest/action.yaml | 2 +- .github/actions/E2ESetupRepositories/action.yaml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/E2EAnalyze/action.yaml b/.github/actions/E2EAnalyze/action.yaml index 24c17b412c..d504cca0ab 100644 --- a/.github/actions/E2EAnalyze/action.yaml +++ b/.github/actions/E2EAnalyze/action.yaml @@ -4,7 +4,7 @@ inputs: shell: description: Shell in which you want to run the action (powershell or pwsh) required: false - default: powershell + default: pwsh maxParallel: description: Maximum parallel jobs required: true diff --git a/.github/actions/E2ECalculateRepoName/action.yaml b/.github/actions/E2ECalculateRepoName/action.yaml index 392ec651f1..fd94339b81 100644 --- a/.github/actions/E2ECalculateRepoName/action.yaml +++ b/.github/actions/E2ECalculateRepoName/action.yaml @@ -4,7 +4,7 @@ inputs: shell: description: Shell in which you want to run the action (powershell or pwsh) required: false - default: powershell + default: pwsh githubOwner: description: GitHub owner for test repositories (optional, for logging purposes) required: false diff --git a/.github/actions/E2ECalculateTestParams/action.yaml b/.github/actions/E2ECalculateTestParams/action.yaml index 1805ab1e45..9305f7b49b 100644 --- a/.github/actions/E2ECalculateTestParams/action.yaml +++ b/.github/actions/E2ECalculateTestParams/action.yaml @@ -4,7 +4,7 @@ inputs: shell: description: Shell in which you want to run the action (powershell or pwsh) required: false - default: powershell + default: pwsh githubOwner: description: GitHub owner for test repositories required: true diff --git a/.github/actions/E2ECheckSecrets/action.yaml b/.github/actions/E2ECheckSecrets/action.yaml index 5a127e4830..806a1da559 100644 --- a/.github/actions/E2ECheckSecrets/action.yaml +++ b/.github/actions/E2ECheckSecrets/action.yaml @@ -4,7 +4,7 @@ inputs: shell: description: Shell in which you want to run the action (powershell or pwsh) required: false - default: powershell + default: pwsh githubOwner: description: GitHub owner (defaults to current repository owner) required: false diff --git a/.github/actions/E2ERunScenario/action.yaml b/.github/actions/E2ERunScenario/action.yaml index be1fca27a5..ffe937c907 100644 --- a/.github/actions/E2ERunScenario/action.yaml +++ b/.github/actions/E2ERunScenario/action.yaml @@ -4,7 +4,7 @@ inputs: shell: description: Shell in which you want to run the action (powershell or pwsh) required: false - default: powershell + default: pwsh scenario: description: Scenario name required: true diff --git a/.github/actions/E2ERunTest/action.yaml b/.github/actions/E2ERunTest/action.yaml index fb3c1800a7..99aa277cce 100644 --- a/.github/actions/E2ERunTest/action.yaml +++ b/.github/actions/E2ERunTest/action.yaml @@ -4,7 +4,7 @@ inputs: shell: description: Shell in which you want to run the action (powershell or pwsh) required: false - default: powershell + default: pwsh testType: description: Test type (test or upgrade) required: false diff --git a/.github/actions/E2ESetupRepositories/action.yaml b/.github/actions/E2ESetupRepositories/action.yaml index 88110a0924..d0e8f601db 100644 --- a/.github/actions/E2ESetupRepositories/action.yaml +++ b/.github/actions/E2ESetupRepositories/action.yaml @@ -4,7 +4,7 @@ inputs: shell: description: Shell in which you want to run the action (powershell or pwsh) required: false - default: powershell + default: pwsh githubOwner: description: GitHub owner for test repositories required: true From 5a002419525946a3d2b94bdfda311f852580e89d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Nov 2025 14:39:17 +0000 Subject: [PATCH 09/18] Add scenariosFilter parameter support to E2EAnalyze action Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .github/actions/E2EAnalyze/E2EAnalyze.ps1 | 10 ++++++++-- .github/actions/E2EAnalyze/action.yaml | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/actions/E2EAnalyze/E2EAnalyze.ps1 b/.github/actions/E2EAnalyze/E2EAnalyze.ps1 index 3174c659bf..a2d32fc2f7 100644 --- a/.github/actions/E2EAnalyze/E2EAnalyze.ps1 +++ b/.github/actions/E2EAnalyze/E2EAnalyze.ps1 @@ -2,7 +2,9 @@ Param( [Parameter(HelpMessage = "Maximum parallel jobs", Mandatory = $true)] [int] $maxParallel, [Parameter(HelpMessage = "Test upgrades from version", Mandatory = $false)] - [string] $testUpgradesFromVersion = 'v5.0' + [string] $testUpgradesFromVersion = 'v5.0', + [Parameter(HelpMessage = "Filter to run specific scenarios (separated by comma, supports wildcards)", Mandatory = $false)] + [string] $scenariosFilter = '*' ) $ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 @@ -56,9 +58,13 @@ $releasesJson = @{ Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "releases=$releasesJson" Write-Host "releases=$releasesJson" +$scenariosFilterArr = $scenariosFilter -split ',' | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne '' } +$allScenarios = @(Get-ChildItem -Path (Join-Path $ENV:GITHUB_WORKSPACE "e2eTests/scenarios/*/runtest.ps1") | ForEach-Object { $_.Directory.Name }) +$filteredScenarios = $allScenarios | Where-Object { $scenario = $_; $scenariosFilterArr | ForEach-Object { $scenario -like $_ } } + $scenariosJson = @{ "matrix" = @{ - "include" = @(Get-ChildItem -path (Join-Path $ENV:GITHUB_WORKSPACE "e2eTests/scenarios/*/runtest.ps1") | ForEach-Object { @{ "Scenario" = $_.Directory.Name } } ) + "include" = @($filteredScenarios | ForEach-Object { @{ "Scenario" = $_ } }) }; "max-parallel" = $maxParallel "fail-fast" = $false diff --git a/.github/actions/E2EAnalyze/action.yaml b/.github/actions/E2EAnalyze/action.yaml index d504cca0ab..f05bd6da60 100644 --- a/.github/actions/E2EAnalyze/action.yaml +++ b/.github/actions/E2EAnalyze/action.yaml @@ -12,6 +12,10 @@ inputs: description: Test upgrades from version required: false default: 'v5.0' + scenariosFilter: + description: Filter to run specific scenarios (separated by comma, supports wildcards) + required: false + default: '*' token: description: GitHub token with permissions to read releases required: true @@ -37,9 +41,10 @@ runs: env: _maxParallel: ${{ inputs.maxParallel }} _testUpgradesFromVersion: ${{ inputs.testUpgradesFromVersion }} + _scenariosFilter: ${{ inputs.scenariosFilter }} GH_TOKEN: ${{ inputs.token }} run: | - ${{ github.action_path }}/E2EAnalyze.ps1 -maxParallel ([int]$ENV:_maxParallel) -testUpgradesFromVersion $ENV:_testUpgradesFromVersion + ${{ github.action_path }}/E2EAnalyze.ps1 -maxParallel ([int]$ENV:_maxParallel) -testUpgradesFromVersion $ENV:_testUpgradesFromVersion -scenariosFilter $ENV:_scenariosFilter branding: icon: activity color: blue From 26a871625c8878a233debe3cf29f08a749c36e23 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Dec 2025 07:33:34 +0000 Subject: [PATCH 10/18] Pass scenariosFilter input to E2EAnalyze action Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .github/workflows/E2E.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/E2E.yaml b/.github/workflows/E2E.yaml index 798b752e71..ceb612e841 100644 --- a/.github/workflows/E2E.yaml +++ b/.github/workflows/E2E.yaml @@ -141,6 +141,7 @@ jobs: with: maxParallel: ${{ needs.Check.outputs.maxParallel }} testUpgradesFromVersion: ${{ env.TestUpgradesFromVersion }} + scenariosFilter: ${{ github.event.inputs.scenariosFilter }} token: ${{ steps.app-token.outputs.token }} ScenariosOnWindows: From fac0f5233513ce731b9464fe909a9be943693f86 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 16 Dec 2025 07:52:07 +0000 Subject: [PATCH 11/18] Add PSScriptAnalyzer suppressions for credential parameters in E2E actions Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 | 10 +++++----- .github/actions/E2ERunScenario/E2ERunScenario.ps1 | 10 +++++----- .github/actions/E2ERunTest/E2ERunTest.ps1 | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 b/.github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 index 73fb0a44c5..b5c18e98fb 100644 --- a/.github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 +++ b/.github/actions/E2ECheckSecrets/E2ECheckSecrets.ps1 @@ -4,15 +4,15 @@ Param( [Parameter(HelpMessage = "E2E_APP_ID variable value", Mandatory = $false)] [string] $e2eAppId = '', [Parameter(HelpMessage = "E2E_PRIVATE_KEY secret value", Mandatory = $false)] - [string] $e2ePrivateKey = '', + [string] $e2ePrivateKey = '', # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "ALGOAUTHAPP secret value", Mandatory = $false)] - [string] $algoAuthApp = '', + [string] $algoAuthApp = '', # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "adminCenterApiCredentials secret value", Mandatory = $false)] - [string] $adminCenterApiCredentials = '', + [string] $adminCenterApiCredentials = '', # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "E2E_GHPackagesPAT secret value", Mandatory = $false)] - [string] $e2eGHPackagesPAT = '', + [string] $e2eGHPackagesPAT = '', # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "E2EAZURECREDENTIALS secret value", Mandatory = $false)] - [string] $e2eAzureCredentials = '' + [string] $e2eAzureCredentials = '' # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] ) $ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 diff --git a/.github/actions/E2ERunScenario/E2ERunScenario.ps1 b/.github/actions/E2ERunScenario/E2ERunScenario.ps1 index 77bd92beab..0565dcb54a 100644 --- a/.github/actions/E2ERunScenario/E2ERunScenario.ps1 +++ b/.github/actions/E2ERunScenario/E2ERunScenario.ps1 @@ -10,19 +10,19 @@ Param( [Parameter(HelpMessage = "E2E App ID", Mandatory = $true)] [string] $e2eAppId, [Parameter(HelpMessage = "E2E App Key", Mandatory = $true)] - [string] $e2eAppKey, + [string] $e2eAppKey, # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "ALGO Auth App", Mandatory = $true)] - [string] $algoAuthApp, + [string] $algoAuthApp, # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "PTE template", Mandatory = $true)] [string] $pteTemplate, [Parameter(HelpMessage = "AppSource template", Mandatory = $true)] [string] $appSourceTemplate, [Parameter(HelpMessage = "Admin center API credentials", Mandatory = $true)] - [string] $adminCenterApiCredentials, + [string] $adminCenterApiCredentials, # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "Azure credentials", Mandatory = $true)] - [string] $azureCredentials, + [string] $azureCredentials, # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "GitHub packages token", Mandatory = $true)] - [string] $githubPackagesToken + [string] $githubPackagesToken # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] ) $ErrorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 diff --git a/.github/actions/E2ERunTest/E2ERunTest.ps1 b/.github/actions/E2ERunTest/E2ERunTest.ps1 index ded44499e7..fe8c08aeb2 100644 --- a/.github/actions/E2ERunTest/E2ERunTest.ps1 +++ b/.github/actions/E2ERunTest/E2ERunTest.ps1 @@ -11,13 +11,13 @@ Param( [Parameter(HelpMessage = "E2E App ID", Mandatory = $true)] [string] $e2eAppId, [Parameter(HelpMessage = "E2E App Key", Mandatory = $true)] - [string] $e2eAppKey, + [string] $e2eAppKey, # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "ALGO Auth App", Mandatory = $true)] - [string] $algoAuthApp, + [string] $algoAuthApp, # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "Template", Mandatory = $true)] [string] $template, [Parameter(HelpMessage = "Admin center API credentials", Mandatory = $false)] - [string] $adminCenterApiCredentials = '', + [string] $adminCenterApiCredentials = '', # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "Multi-project", Mandatory = $false)] [bool] $multiProject = $false, [Parameter(HelpMessage = "AppSource app", Mandatory = $false)] From d8bd92a9175236c2703ab138ba19f1f8607ab688 Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:30:22 +0100 Subject: [PATCH 12/18] Initialize github variable in e2eTestHelper.psm1 for consistent state management --- e2eTests/e2eTestHelper.psm1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e2eTests/e2eTestHelper.psm1 b/e2eTests/e2eTestHelper.psm1 index e3bdaefe7a..b24cfcb27d 100644 --- a/e2eTests/e2eTestHelper.psm1 +++ b/e2eTests/e2eTestHelper.psm1 @@ -5,6 +5,7 @@ $defaultApplication = "22.0.0.0" $defaultRuntime = "10.0" $defaultPublisher = "MS Test" $lastTokenRefresh = 0 +$github = $false Import-Module (Join-Path $PSScriptRoot "..\Actions\Github-Helper.psm1" -Resolve) -DisableNameChecking -Global . (Join-Path $PSScriptRoot "..\Actions\AL-Go-Helper.ps1" -Resolve) @@ -25,6 +26,7 @@ function SetTokenAndRepository { $script:githubOwner = $githubOwner $script:defaultRepository = $repository + $script:github = $github if ($github) { invoke-git config --global user.email "$githubOwner@users.noreply.github.com" From b9cf0c7ddd31fac33c22eb47396fdef331072cbd Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Tue, 6 Jan 2026 16:10:21 +0100 Subject: [PATCH 13/18] Set default repository in CancelAllWorkflows, WaitAllWorkflows, and Test-LogContainsFromRun functions --- e2eTests/e2eTestHelper.psm1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/e2eTests/e2eTestHelper.psm1 b/e2eTests/e2eTestHelper.psm1 index b24cfcb27d..c9a97a2dd7 100644 --- a/e2eTests/e2eTestHelper.psm1 +++ b/e2eTests/e2eTestHelper.psm1 @@ -242,6 +242,11 @@ function CancelAllWorkflows { if (-not $noDelay.IsPresent) { Start-Sleep -Seconds 60 } + + if (!$repository) { + $repository = $defaultRepository + } + $runs = invoke-gh api /repos/$repository/actions/runs -silent -returnValue | ConvertFrom-Json foreach($run in $runs.workflow_runs) { Write-Host $run.name @@ -262,6 +267,11 @@ function WaitAllWorkflows { if (-not $noDelay.IsPresent) { Start-Sleep -Seconds 60 } + + if (!$repository) { + $repository = $defaultRepository + } + $runs = invoke-gh api /repos/$repository/actions/runs -silent -returnValue | ConvertFrom-Json $workflowRuns = $runs.workflow_runs | Select-Object -First $top foreach($run in $workflowRuns) { @@ -691,6 +701,10 @@ function Test-LogContainsFromRun { [switch] $isRegEx ) + if (!$repository) { + $repository = $defaultRepository + } + DownloadWorkflowLog -repository $repository -runid $runid -path 'logs' try { # Log format changes are rolling out on GitHub Actions, we have to support both From d374ea9f15536c5c019095ccc1c7c3e18fb379a0 Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Tue, 6 Jan 2026 16:43:44 +0100 Subject: [PATCH 14/18] Set default repository in CommitAndPush function --- e2eTests/e2eTestHelper.psm1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/e2eTests/e2eTestHelper.psm1 b/e2eTests/e2eTestHelper.psm1 index c9a97a2dd7..0a45b24125 100644 --- a/e2eTests/e2eTestHelper.psm1 +++ b/e2eTests/e2eTestHelper.psm1 @@ -560,9 +560,7 @@ function CommitAndPush { [switch] $wait ) - if (!$repository) { - $repository = $defaultRepository - } + $repository = $defaultRepository RefreshToken -repository $repository From e3fc5f3e2b482221568558b24a24df4a3c1c54a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 15 Jan 2026 14:24:06 +0000 Subject: [PATCH 15/18] Fix E2E test failure: quote repository names in gh repo create calls Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- Internal/Deploy.ps1 | 2 +- e2eTests/e2eTestHelper.psm1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Internal/Deploy.ps1 b/Internal/Deploy.ps1 index 84ca0b8f83..cc89d3df77 100644 --- a/Internal/Deploy.ps1 +++ b/Internal/Deploy.ps1 @@ -172,7 +172,7 @@ try { catch { Write-Host "gh repo create $($config.githubOwner)/$repo --public --clone" $ownerRepo = "$($config.githubOwner)/$repo" - invoke-gh repo create $ownerRepo --public --clone + invoke-gh repo create "$ownerRepo" --public --clone Start-Sleep -Seconds 10 Set-Location $repo invoke-git checkout -b $branch diff --git a/e2eTests/e2eTestHelper.psm1 b/e2eTests/e2eTestHelper.psm1 index 0a45b24125..12d4454d51 100644 --- a/e2eTests/e2eTestHelper.psm1 +++ b/e2eTests/e2eTestHelper.psm1 @@ -434,11 +434,11 @@ function CreateAlGoRepository { } if ($private) { Write-Host -ForegroundColor Yellow "`nCreating private repository $repository (based on $template)" - invoke-gh repo create $repository --private --clone + invoke-gh repo create "$repository" --private --clone } else { Write-Host -ForegroundColor Yellow "`nCreating public repository $repository (based on $template)" - invoke-gh repo create $repository --public --clone + invoke-gh repo create "$repository" --public --clone } Start-Sleep -seconds 10 Set-Location '*' From b3b0575e5d52962223044af27ad01fca5cf9fc88 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 11:18:31 +0000 Subject: [PATCH 16/18] Remove incorrect quotes from GitHub Actions outputs in E2ECalculateTestParams Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .../E2ECalculateTestParams.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 b/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 index f468ad7737..1792499149 100644 --- a/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 +++ b/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 @@ -46,22 +46,22 @@ if (-not $contentPath -and $matrixType) { # Add outputs if ($adminCenterApiCredentials) { - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials='$adminCenterApiCredentials'" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials=$adminCenterApiCredentials" } else { - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials=''" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials=" } if ($template) { - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "template='$template'" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "template=$template" } if ($contentPath) { - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "contentPath='$contentPath'" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "contentPath=$contentPath" } # Generate repo name $reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName()) -Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'" -Write-Host "repoName='$repoName'" +Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName=$repoName" +Write-Host "repoName=$repoName" Write-Host "Repo URL: https://github.com/$githubOwner/$repoName" From 39bccf8d59db2273a6b9c3e34cdb85c5c88eb523 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Feb 2026 14:09:05 +0000 Subject: [PATCH 17/18] Add PSScriptAnalyzer suppression for adminCenterApiCredentialsSecret parameter Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .../actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 b/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 index 1792499149..5ac0bfdfbb 100644 --- a/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 +++ b/.github/actions/E2ECalculateTestParams/E2ECalculateTestParams.ps1 @@ -8,7 +8,7 @@ Param( [Parameter(HelpMessage = "Matrix OS (windows or linux)", Mandatory = $false)] [string] $matrixOs = '', [Parameter(HelpMessage = "Admin center API credentials secret", Mandatory = $false)] - [string] $adminCenterApiCredentialsSecret = '', + [string] $adminCenterApiCredentialsSecret = '', # [SuppressMessage('PSAvoidUsingPlainTextForPassword', '', Justification='GitHub Actions secrets are already masked in logs')] [Parameter(HelpMessage = "AppSource app repository template", Mandatory = $true)] [string] $appSourceAppRepo, [Parameter(HelpMessage = "Per-tenant extension repository template", Mandatory = $true)] From db6caee9ccc289d5eb3dcbc85fdbbb3381605148 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 27 Feb 2026 11:03:17 +0000 Subject: [PATCH 18/18] Merge main branch and add disabled scenarios support to E2EAnalyze Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com> --- .github/actions/E2EAnalyze/E2EAnalyze.ps1 | 31 ++++++++++++++ .github/workflows/StaleIssues.yml | 2 +- .github/workflows/powershell.yaml | 2 +- .github/workflows/scorecard-analysis.yml | 2 +- Actions/AL-Go-Helper.ps1 | 30 ++++++++++++++ .../DetermineDeploymentEnvironments.ps1 | 6 ++- .../GetArtifactsForDeployment.ps1 | 29 ++++++++++---- Actions/GetArtifactsForDeployment/README.md | 1 + Actions/GetArtifactsForDeployment/action.yaml | 7 +++- Actions/RunPipeline/RunPipeline.ps1 | 1 + RELEASENOTES.md | 7 ++++ Scenarios/settings.md | 2 +- .../workflows/PublishToEnvironment.yaml | 1 + .../workflows/PublishToEnvironment.yaml | 1 + .../DetermineDeploymentEnvironments.Test.ps1 | 40 +++++++++++++++++-- e2eTests/disabled-scenarios.json | 6 +++ 16 files changed, 151 insertions(+), 17 deletions(-) create mode 100644 e2eTests/disabled-scenarios.json diff --git a/.github/actions/E2EAnalyze/E2EAnalyze.ps1 b/.github/actions/E2EAnalyze/E2EAnalyze.ps1 index a2d32fc2f7..7b762f9dbb 100644 --- a/.github/actions/E2EAnalyze/E2EAnalyze.ps1 +++ b/.github/actions/E2EAnalyze/E2EAnalyze.ps1 @@ -62,6 +62,37 @@ $scenariosFilterArr = $scenariosFilter -split ',' | ForEach-Object { $_.Trim() } $allScenarios = @(Get-ChildItem -Path (Join-Path $ENV:GITHUB_WORKSPACE "e2eTests/scenarios/*/runtest.ps1") | ForEach-Object { $_.Directory.Name }) $filteredScenarios = $allScenarios | Where-Object { $scenario = $_; $scenariosFilterArr | ForEach-Object { $scenario -like $_ } } +# Load disabled scenarios from config file (optional) +$disabledScenariosConfigPath = Join-Path $ENV:GITHUB_WORKSPACE "e2eTests/disabled-scenarios.json" +$disabledScenariosConfig = @() +if (Test-Path -Path $disabledScenariosConfigPath) { + $disabledScenariosContent = Get-Content -Path $disabledScenariosConfigPath -Encoding UTF8 -Raw + if (-not [string]::IsNullOrWhiteSpace($disabledScenariosContent)) { + $disabledScenariosConfig = $disabledScenariosContent | ConvertFrom-Json + } +} +else { + Write-Host "No disabled-scenarios.json found; proceeding with all scenarios enabled." +} +$disabledScenarios = @() +if ($disabledScenariosConfig -and $disabledScenariosConfig.Count -gt 0) { + $disabledScenarios = @($disabledScenariosConfig | ForEach-Object { $_.scenario }) +} +Write-Host "Disabled scenarios from config: $($disabledScenarios -join ', ')" + +# Filter out disabled scenarios +$scenariosBeforeDisabledFilter = $filteredScenarios +$beforeFilter = $filteredScenarios.Count +$filteredScenarios = $filteredScenarios | Where-Object { $disabledScenarios -notcontains $_ } +$afterFilter = $filteredScenarios.Count +if ($beforeFilter -ne $afterFilter) { + Write-Host "Filtered out $($beforeFilter - $afterFilter) disabled scenario(s)" + $disabledScenariosConfig | Where-Object { ($scenariosBeforeDisabledFilter -contains $_.scenario) -and ($filteredScenarios -notcontains $_.scenario) } | ForEach-Object { + Write-Host " - $($_.scenario): $($_.reason)" + } +} +Write-Host "Scenarios to run: $($filteredScenarios -join ', ')" + $scenariosJson = @{ "matrix" = @{ "include" = @($filteredScenarios | ForEach-Object { @{ "Scenario" = $_ } }) diff --git a/.github/workflows/StaleIssues.yml b/.github/workflows/StaleIssues.yml index b58223999e..980553af80 100644 --- a/.github/workflows/StaleIssues.yml +++ b/.github/workflows/StaleIssues.yml @@ -12,7 +12,7 @@ jobs: issues: write steps: - - uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v10.1.1 + - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0 with: stale-issue-label: 'stale' days-before-issue-stale: 180 diff --git a/.github/workflows/powershell.yaml b/.github/workflows/powershell.yaml index c38304b715..d0fdbe5f44 100644 --- a/.github/workflows/powershell.yaml +++ b/.github/workflows/powershell.yaml @@ -38,6 +38,6 @@ jobs: # Upload the SARIF file generated in the previous step - name: Upload SARIF results file - uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3 + uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 with: sarif_file: results.sarif diff --git a/.github/workflows/scorecard-analysis.yml b/.github/workflows/scorecard-analysis.yml index 151f0d79f7..e92ea5bfd5 100644 --- a/.github/workflows/scorecard-analysis.yml +++ b/.github/workflows/scorecard-analysis.yml @@ -37,6 +37,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3 + uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e # v4.32.4 with: sarif_file: results.sarif diff --git a/Actions/AL-Go-Helper.ps1 b/Actions/AL-Go-Helper.ps1 index 82829f4875..dd73c86c4e 100644 --- a/Actions/AL-Go-Helper.ps1 +++ b/Actions/AL-Go-Helper.ps1 @@ -1230,6 +1230,36 @@ function GetContainerName([string] $project) { "bc$($project -replace "[^a-z0-9\-]")$env:GITHUB_RUN_ID" } +<# + .SYNOPSIS + Ensures that the Docker service is running on Windows. + .DESCRIPTION + Occasionally, on GitHub-hosted Windows runners, the Docker service may not start automatically, which can cause issues for workflows that depend on Docker. +#> +function Assert-DockerIsRunning { + try { + if (-not $isWindows) { + return + } + $dockerService = Get-Service -Name 'docker' -ErrorAction SilentlyContinue + if (-not $dockerService) { + Write-Host "Docker service not found" + return + } + if ($dockerService.Status -eq 'Running') { + return + } + Write-Host "Docker service is not running (status: $($dockerService.Status)). Attempting to start..." + Start-Service docker -ErrorAction Stop + $dockerService = Get-Service -Name 'docker' + $dockerService.WaitForStatus('Running', [TimeSpan]::FromSeconds(60)) + Write-Host "Docker service started successfully" + } + catch { + OutputWarning "Failed to ensure Docker is running: $($_.Exception.Message)" + } +} + function CreateDevEnv { Param( [Parameter(Mandatory = $true)] diff --git a/Actions/DetermineDeploymentEnvironments/DetermineDeploymentEnvironments.ps1 b/Actions/DetermineDeploymentEnvironments/DetermineDeploymentEnvironments.ps1 index 43fe98a732..6fc16f99ed 100644 --- a/Actions/DetermineDeploymentEnvironments/DetermineDeploymentEnvironments.ps1 +++ b/Actions/DetermineDeploymentEnvironments/DetermineDeploymentEnvironments.ps1 @@ -285,7 +285,11 @@ else { $json = @{"matrix" = @{ "include" = @() }; "fail-fast" = $false } $deploymentEnvironments.Keys | Sort-Object | ForEach-Object { $deploymentEnvironment = $deploymentEnvironments."$_" - $json.matrix.include += @{ "environment" = $_; "os" = "$(ConvertTo-Json -InputObject @($deploymentEnvironment."runs-on".Split(',').Trim()) -compress)"; "shell" = $deploymentEnvironment."shell" } + $buildMode = "Default" + if ($deploymentEnvironment.ContainsKey("buildMode") -and $deploymentEnvironment."buildMode") { + $buildMode = $deploymentEnvironment."buildMode" + } + $json.matrix.include += @{ "environment" = $_; "os" = "$(ConvertTo-Json -InputObject @($deploymentEnvironment."runs-on".Split(',').Trim()) -compress)"; "shell" = $deploymentEnvironment."shell"; "buildMode" = $buildMode } } $environmentsMatrixJson = $json | ConvertTo-Json -Depth 99 -compress Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "EnvironmentsMatrixJson=$environmentsMatrixJson" diff --git a/Actions/GetArtifactsForDeployment/GetArtifactsForDeployment.ps1 b/Actions/GetArtifactsForDeployment/GetArtifactsForDeployment.ps1 index 30c2f5e7c4..52cc7be242 100644 --- a/Actions/GetArtifactsForDeployment/GetArtifactsForDeployment.ps1 +++ b/Actions/GetArtifactsForDeployment/GetArtifactsForDeployment.ps1 @@ -4,18 +4,32 @@ Param( [Parameter(HelpMessage = "Artifacts version to download (current, prerelease, draft, latest or version number)", Mandatory = $true)] [string] $artifactsVersion, [Parameter(HelpMessage = "Folder in which the artifacts will be downloaded", Mandatory = $true)] - [string] $artifactsFolder + [string] $artifactsFolder, + [Parameter(HelpMessage = "Build mode used when building the artifacts", Mandatory = $false)] + [string] $buildMode = 'Default' ) Import-Module (Join-Path -Path $PSScriptRoot "GetArtifactsForDeployment.psm1") . (Join-Path -Path $PSScriptRoot -ChildPath "..\AL-Go-Helper.ps1" -Resolve) DownloadAndImportBcContainerHelper +# If buildMode is 'Default', set it to empty string (no prefix in artifact names) +$buildModePrefix = $buildMode +if ($buildMode -eq 'Default') { + $buildModePrefix = '' +} + # Get artifacts for all projects $projects = "*" -$artifactsToDownload = @("Apps","TestApps","Dependencies","PowerPlatformSolution") -Write-Host "Get artifacts for version: '$artifactsVersion' for these projects: '$projects' to folder: '$artifactsFolder'" +# Default artifact types (used for releases which only support default buildMode) +$defaultArtifactTypes = @("Apps","TestApps","Dependencies","PowerPlatformSolution") + +# Artifact types with buildMode prefix (used for workflow artifacts) +# PowerPlatformSolution is always built with 'default' buildMode, so it never has a prefix +$buildModeArtifactTypes = @("$($buildModePrefix)Apps","$($buildModePrefix)TestApps","$($buildModePrefix)Dependencies","PowerPlatformSolution") + +Write-Host "Get artifacts for version: '$artifactsVersion' (build mode: $buildMode) for these projects: '$projects' to folder: '$artifactsFolder'" $artifactsFolder = Join-Path $ENV:GITHUB_WORKSPACE $artifactsFolder if (!(Test-Path $artifactsFolder)) { @@ -38,7 +52,8 @@ if ($artifactsVersion -eq "current" -or $artifactsVersion -eq "prerelease" -or $ if (!($release)) { throw "Unable to locate $artifactsVersion release" } - $artifactsToDownload | ForEach-Object { + # Releases only contain default buildMode artifacts + $defaultArtifactTypes | ForEach-Object { DownloadRelease -token $token -projects $projects -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY -release $release -path $artifactsFolder -mask $_ -unpack } } @@ -72,13 +87,13 @@ elseif ($artifactsVersion -like "PR_*") { $expiredArtifacts = @() $lastKnownGoodBuildArtifacts = @() # Get PR artifacts - $artifactsToDownload | ForEach-Object { + $buildModeArtifactTypes | ForEach-Object { $prArtifacts += GetArtifactsFromWorkflowRun -workflowRun $latestPRBuildId -token $token -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY -mask $_ -projects $projects -expiredArtifacts ([ref]$expiredArtifacts) } # Get last known good build artifacts referenced from PR if ($lastKnownGoodBuildId -ne 0) { Write-Host "Last known good build id: $lastKnownGoodBuildId" - $artifactsToDownload | ForEach-Object { + $buildModeArtifactTypes | ForEach-Object { $lastKnownGoodBuildArtifacts += GetArtifactsFromWorkflowRun -workflowRun $lastKnownGoodBuildId -token $token -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY -mask $_ -projects $projects -expiredArtifacts ([ref]$expiredArtifacts) } } @@ -106,7 +121,7 @@ else { if ($searchArtifacts) { $allArtifacts = @() - $artifactsToDownload | ForEach-Object { + $buildModeArtifactTypes | ForEach-Object { $allArtifacts += @(GetArtifacts -token $token -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY -mask $_ -projects $projects -version $artifactsVersion -branch $ENV:GITHUB_REF_NAME) } if ($allArtifacts) { diff --git a/Actions/GetArtifactsForDeployment/README.md b/Actions/GetArtifactsForDeployment/README.md index 40d153eeee..be7324665c 100644 --- a/Actions/GetArtifactsForDeployment/README.md +++ b/Actions/GetArtifactsForDeployment/README.md @@ -16,6 +16,7 @@ none | token | | The GitHub token running the action | github.token | | artifactsVersion | Yes | Artifacts version to download (current, prerelease, draft, latest or version number) | | | artifactsFolder | Yes | Folder in which the artifacts will be downloaded | | +| buildMode | | Build mode used when building the artifacts | Default | ## OUTPUT diff --git a/Actions/GetArtifactsForDeployment/action.yaml b/Actions/GetArtifactsForDeployment/action.yaml index 67e1578128..5d41a20b34 100644 --- a/Actions/GetArtifactsForDeployment/action.yaml +++ b/Actions/GetArtifactsForDeployment/action.yaml @@ -15,6 +15,10 @@ inputs: artifactsFolder: description: Folder in which the artifacts will be downloaded required: true + buildMode: + description: Build mode used when building the artifacts + required: false + default: 'Default' runs: using: composite steps: @@ -24,9 +28,10 @@ runs: _token: ${{ inputs.token }} _artifactsVersion: ${{ inputs.artifactsVersion }} _artifactsFolder: ${{ inputs.artifactsFolder }} + _buildMode: ${{ inputs.buildMode }} run: | ${{ github.action_path }}/../Invoke-AlGoAction.ps1 -ActionName "GetArtifactsForDeployment" -Action { - ${{ github.action_path }}/GetArtifactsForDeployment.ps1 -token $ENV:_token -artifactsVersion $ENV:_artifactsVersion -artifactsFolder $ENV:_artifactsFolder + ${{ github.action_path }}/GetArtifactsForDeployment.ps1 -token $ENV:_token -artifactsVersion $ENV:_artifactsVersion -artifactsFolder $ENV:_artifactsFolder -buildMode $ENV:_buildMode } branding: icon: terminal diff --git a/Actions/RunPipeline/RunPipeline.ps1 b/Actions/RunPipeline/RunPipeline.ps1 index fcde6d99f7..722e2fc380 100644 --- a/Actions/RunPipeline/RunPipeline.ps1 +++ b/Actions/RunPipeline/RunPipeline.ps1 @@ -27,6 +27,7 @@ try { Import-Module (Join-Path -Path $PSScriptRoot -ChildPath "..\DetermineProjectsToBuild\DetermineProjectsToBuild.psm1" -Resolve) -DisableNameChecking if ($isWindows) { + Assert-DockerIsRunning # Pull docker image in the background $genericImageName = Get-BestGenericImageName Start-Job -ScriptBlock { diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 079226dbe0..1150a852bc 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,5 +1,12 @@ ### Issues +- Attempt to start docker service in case it is not running + +## v8.3 + +### Issues + +- Issue 2107 Publish a specific build mode to an environment - Issue 1915 CICD fails on releases/26.x branch - '26.x' cannot be recognized as a semantic version string ### The default pull request trigger is changing diff --git a/Scenarios/settings.md b/Scenarios/settings.md index 478f1ceecf..3e15d01f2f 100644 --- a/Scenarios/settings.md +++ b/Scenarios/settings.md @@ -77,7 +77,7 @@ The repository settings are only read from the repository settings file (.github | alDoc | Structure with properties for the aldoc reference document generation. The structure can contain the following properties:
**continuousDeployment** = Determines if reference documentation will be deployed continuously as part of CI/CD. You can run the **Deploy Reference Documentation** workflow to deploy manually or on a schedule. (Default false)
**deployToGitHubPages** = Determines whether or not the reference documentation site should be deployed to GitHub Pages for the repository. In order to deploy to GitHub Pages, GitHub Pages must be enabled and set to GitHub Actuibs. (Default true)
**maxReleases** = Maximum number of releases to include in the reference documentation. (Default 3)
**groupByProject** = Determines whether projects in multi-project repositories are used as folders in reference documentation
**includeProjects** = An array of projects to include in the reference documentation. (Default all)
**excludeProjects** = An array of projects to exclude in the reference documentation. (Default none)
**header** = Header for the documentation site. (Default: Documentation for...)
**footer** = Footer for the documentation site. (Default: Made with...)
**defaultIndexMD** = Markdown for the landing page of the documentation site. (Default: Reference documentation...)
**defaultReleaseMD** = Markdown for the landing page of the release sites. (Default: Release reference documentation...)
*Note that in header, footer, defaultIndexMD and defaultReleaseMD you can use the following placeholders: {REPOSITORY}, {VERSION}, {INDEXTEMPLATERELATIVEPATH}, {RELEASENOTES}* | | useProjectDependencies | Determines whether your projects are built using a multi-stage built workflow or single stage. After setting useProjectDependencies to true, you need to run Update AL-Go System Files and your workflows including a build job will change to have multiple build jobs, depending on each other. The number of build jobs will be determined by the dependency depth in your projects.
You can change dependencies between your projects, but if the dependency **depth** changes, AL-Go will warn you that updates for your AL-Go System Files are available and you will need to run the workflow. | | CICDPushBranches | CICDPushBranches can be specified as an array of branches, which triggers a CI/CD workflow on commit. You need to run the Update AL-Go System Files workflow for the change to take effect.
Default is [ "main", "release/\*", "feature/\*" ]

**Supported release branch naming formats:**
When using release branches, AL-Go supports various naming conventions for matching previous releases during upgrade testing. The following formats are recognized:
• `releases/26` - matches releases with major version 26
• `releases/26.x` - matches releases with major version 26
• `releases/26x` - matches releases with major version 26
• `releases/v26` - matches releases with major version 26
• `releases/v26.x` - matches releases with major version 26
• `releases/v26x` - matches releases with major version 26
• `releases/26.3` - matches releases with major.minor version 26.3
The same patterns work with the singular `release/` prefix. | -| CICDPullRequestBranches | CICDPullRequestBranches can be specified as an array of branches, which triggers a CI/CD workflow on a PR. You need to run the Update AL-Go System Files workflow for the change to take effect.
Default is [ "main" ] | +| CICDPullRequestBranches | CICDPullRequestBranches can be specified as an array of branches (branch patterns). A Pull Request Build will be triggered when a PR targets a branch that matches one of the patterns in this list. You need to run the Update AL-Go System Files workflow for the change to take effect.
Default is [ "main" ] | | pullRequestTrigger | Setting for specifying the trigger AL-Go should use to trigger Pull Request Builds. Note that when using the default `pull_request` trigger, secrets are not available to the workflow for pull requests from forks. If you need secret access for fork PRs, you can set this to `pull_request_target`, but make sure you understand the [security implications](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target) first. You need to run the Update AL-Go System Files workflow for the change to take effect.
Default is [pull_request](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request) | | buildModes | A list of build modes to use when building the AL-Go projects. Every AL-Go project will be built using each build mode. The following build modes have special meaning in AL-Go:
**Default**: Apps are compiled as they are in the source code.
**Clean**: Should be used for Clean Mode. Use [Conditional Settings](https://aka.ms/algosettings#conditional-settings) with buildMode set the 'Clean' to specify preprocessorSymbols for clean mode.
**Translated**: `TranslationFile` compiler feature is enabled when compiling the apps.

It is also possible to specify custom build modes by adding a build mode that is different than 'Default', 'Clean' or 'Translated' and use [conditional settings](https://aka.ms/algosettings#conditional-settings) to specify preprocessor symbols and other build settings for the build mode. | | useGitSubmodules | If your repository is using Git Submodules, you can set the `useGitSubmodules` setting to `"true"` or `"recursive"` in order to use these submodules during build workflows. If `useGitSubmodules` is not set, git submodules are not initialized. If the submodules reside in private repositories, you need to define a `gitSubmodulesToken` secret. Read [this](https://aka.ms/algosecrets#gitSubmodulesToken) for more information. | diff --git a/Templates/AppSource App/.github/workflows/PublishToEnvironment.yaml b/Templates/AppSource App/.github/workflows/PublishToEnvironment.yaml index 710d401195..e60df4fc8f 100644 --- a/Templates/AppSource App/.github/workflows/PublishToEnvironment.yaml +++ b/Templates/AppSource App/.github/workflows/PublishToEnvironment.yaml @@ -169,6 +169,7 @@ jobs: shell: ${{ matrix.shell }} artifactsVersion: ${{ github.event.inputs.appVersion }} artifactsFolder: '.artifacts' + buildMode: ${{ matrix.buildMode }} - name: Deploy to Business Central id: Deploy diff --git a/Templates/Per Tenant Extension/.github/workflows/PublishToEnvironment.yaml b/Templates/Per Tenant Extension/.github/workflows/PublishToEnvironment.yaml index 710d401195..e60df4fc8f 100644 --- a/Templates/Per Tenant Extension/.github/workflows/PublishToEnvironment.yaml +++ b/Templates/Per Tenant Extension/.github/workflows/PublishToEnvironment.yaml @@ -169,6 +169,7 @@ jobs: shell: ${{ matrix.shell }} artifactsVersion: ${{ github.event.inputs.appVersion }} artifactsFolder: '.artifacts' + buildMode: ${{ matrix.buildMode }} - name: Deploy to Business Central id: Deploy diff --git a/Tests/DetermineDeploymentEnvironments.Test.ps1 b/Tests/DetermineDeploymentEnvironments.Test.ps1 index e577b2177c..6b90ef76ad 100644 --- a/Tests/DetermineDeploymentEnvironments.Test.ps1 +++ b/Tests/DetermineDeploymentEnvironments.Test.ps1 @@ -58,13 +58,13 @@ Describe "DetermineDeploymentEnvironments Action Test" { $env:Settings = @{ "type" = "PTE"; "runs-on" = "ubuntu-latest"; "shell" = "pwsh"; "environments" = @(); "excludeEnvironments" = @( 'github-pages' ); "alDoc" = @{ "continuousDeployment" = $false; "deployToGitHubPages" = $false } } | ConvertTo-Json -Compress . (Join-Path $scriptRoot $scriptName) -getEnvironments '*' -type 'CD' PassGeneratedOutput - $EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"matrix"=@{"include"=@(@{"environment"="another";"os"="[""ubuntu-latest""]";"shell"="pwsh"};@{"environment"="test";"os"="[""ubuntu-latest""]";"shell"="pwsh"})};"fail-fast"=$false} + $EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"matrix"=@{"include"=@(@{"environment"="another";"os"="[""ubuntu-latest""]";"shell"="pwsh";"buildMode"="Default"};@{"environment"="test";"os"="[""ubuntu-latest""]";"shell"="pwsh";"buildMode"="Default"})};"fail-fast"=$false} $DeploymentEnvironmentsJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"test"=@{"EnvironmentType"="SaaS";"EnvironmentName"="test";"Branches"=@();"BranchesFromPolicy"=@();"Projects"="*";"DependencyInstallMode"="install";"Scope"=$null;"syncMode"=$null;"buildMode"=$null;"continuousDeployment"=$null;"runs-on"=@("ubuntu-latest");"shell"="pwsh";"ppEnvironmentUrl"="";"companyId"="";"includeTestAppsInSandboxEnvironment"=$false;"excludeAppIds"=@()};"another"=@{"EnvironmentType"="SaaS";"EnvironmentName"="another";"Branches"=@();"BranchesFromPolicy"=@();"Projects"="*";"DependencyInstallMode"="install";"Scope"=$null;"syncMode"=$null;"buildMode"=$null;"continuousDeployment"=$null;"runs-on"=@("ubuntu-latest");"shell"="pwsh";"ppEnvironmentUrl"="";"companyId"="";"includeTestAppsInSandboxEnvironment"=$false;"excludeAppIds"=@()}} $EnvironmentCount | Should -Be 2 . (Join-Path $scriptRoot $scriptName) -getEnvironments 'test' -type 'CD' PassGeneratedOutput - $EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"matrix"=@{"include"=@(@{"environment"="test";"os"="[""ubuntu-latest""]";"shell"="pwsh"})};"fail-fast"=$false} + $EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"matrix"=@{"include"=@(@{"environment"="test";"os"="[""ubuntu-latest""]";"shell"="pwsh";"buildMode"="Default"})};"fail-fast"=$false} $DeploymentEnvironmentsJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"test"=@{"EnvironmentType"="SaaS";"EnvironmentName"="test";"Branches"=@();"BranchesFromPolicy"=@();"Projects"="*";"DependencyInstallMode"="install";"Scope"=$null;"syncMode"=$null;"buildMode"=$null;"continuousDeployment"=$null;"runs-on"=@("ubuntu-latest");"shell"="pwsh";"ppEnvironmentUrl"="";"companyId"="";"includeTestAppsInSandboxEnvironment"=$false;"excludeAppIds"=@()}} $EnvironmentCount | Should -Be 1 } @@ -81,7 +81,7 @@ Describe "DetermineDeploymentEnvironments Action Test" { $env:Settings = @{ "type" = "PTE"; "runs-on" = "ubuntu-latest"; "shell" = "pwsh"; "environments" = @(); "excludeEnvironments" = @( 'github-pages' ); "alDoc" = @{ "continuousDeployment" = $false; "deployToGitHubPages" = $false } } | ConvertTo-Json -Compress . (Join-Path $scriptRoot $scriptName) -getEnvironments '*' -type 'CD' PassGeneratedOutput - $EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"matrix"=@{"include"=@(@{"environment"="another";"os"="[""ubuntu-latest""]";"shell"="pwsh"})};"fail-fast"=$false} + $EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"matrix"=@{"include"=@(@{"environment"="another";"os"="[""ubuntu-latest""]";"shell"="pwsh";"buildMode"="Default"})};"fail-fast"=$false} $DeploymentEnvironmentsJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"another"=@{"EnvironmentType"="SaaS";"EnvironmentName"="another";"Branches"=@();"BranchesFromPolicy"=@();"Projects"="*";"DependencyInstallMode"="install";"Scope"=$null;"syncMode"=$null;"buildMode"=$null;"continuousDeployment"=$null;"runs-on"=@("ubuntu-latest");"shell"="pwsh";"ppEnvironmentUrl"="";"companyId"="";"includeTestAppsInSandboxEnvironment"=$false;"excludeAppIds"=@()}} $EnvironmentCount | Should -Be 1 @@ -107,7 +107,7 @@ Describe "DetermineDeploymentEnvironments Action Test" { # Only another environment should be included when deploying from main . (Join-Path $scriptRoot $scriptName) -getEnvironments '*' -type 'CD' PassGeneratedOutput - $EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"matrix"=@{"include"=@(@{"environment"="another";"os"="[""ubuntu-latest""]";"shell"="pwsh"})};"fail-fast"=$false} + $EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"matrix"=@{"include"=@(@{"environment"="another";"os"="[""ubuntu-latest""]";"shell"="pwsh";"buildMode"="Default"})};"fail-fast"=$false} $DeploymentEnvironmentsJson | ConvertFrom-Json | ConvertTo-HashTable -recurse | Should -MatchHashtable @{"another"=@{"EnvironmentType"="SaaS";"EnvironmentName"="another";"Branches"=@();"BranchesFromPolicy"=@();"Projects"="*";"DependencyInstallMode"="install";"Scope"=$null;"syncMode"=$null;"buildMode"=$null;"continuousDeployment"=$null;"runs-on"=@("ubuntu-latest");"shell"="pwsh";"ppEnvironmentUrl"="";"companyId"="";"includeTestAppsInSandboxEnvironment"=$false;"excludeAppIds"=@()}} $EnvironmentCount | Should -Be 1 ($EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse).matrix.include.environment | Should -Contain "another" @@ -239,6 +239,38 @@ Describe "DetermineDeploymentEnvironments Action Test" { ($EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse).matrix.include.environment | Should -Contain "test (PROD)" } + # Test that buildMode from DeployTo settings is correctly included in the matrix + It 'Test calling action directly - Custom buildMode from DeployTo settings is included in matrix' { + Mock InvokeWebRequest -ParameterFilter { $uri -like '*/environments' } -MockWith { + return @{"Content" = (ConvertTo-Json -Compress -Depth 99 -InputObject @{ "environments" = @( @{ "name" = "test"; "protection_rules" = @() } ) })} + } + + $settings = @{ + "type" = "PTE" + "runs-on" = "ubuntu-latest" + "shell" = "pwsh" + "environments" = @() + "excludeEnvironments" = @( 'github-pages' ) + "alDoc" = @{ "continuousDeployment" = $false; "deployToGitHubPages" = $false } + "DeployToTest" = @{ + "buildMode" = "CustomBuildMode" + } + } + + $env:Settings = $settings | ConvertTo-Json -Compress -Depth 5 + . (Join-Path $scriptRoot $scriptName) -getEnvironments '*' -type 'CD' + PassGeneratedOutput + + # Verify buildMode is correctly set to CustomBuildMode in the matrix + $matrix = $EnvironmentsMatrixJson | ConvertFrom-Json | ConvertTo-HashTable -recurse + $matrix.matrix.include[0].buildMode | Should -Be "CustomBuildMode" + $EnvironmentCount | Should -Be 1 + + # Verify buildMode is correctly set in DeploymentEnvironmentsJson + $deployEnvs = $DeploymentEnvironmentsJson | ConvertFrom-Json | ConvertTo-HashTable -recurse + $deployEnvs.test.buildMode | Should -Be "CustomBuildMode" + } + # Unknown environment - createEnvIfNotExists = false (default) - should throw error It 'Test calling action directly - Unknown environment without createEnvIfNotExists should throw' { Mock InvokeWebRequest -ParameterFilter { $uri -like '*/environments' } -MockWith { diff --git a/e2eTests/disabled-scenarios.json b/e2eTests/disabled-scenarios.json new file mode 100644 index 0000000000..f95fda8561 --- /dev/null +++ b/e2eTests/disabled-scenarios.json @@ -0,0 +1,6 @@ +[ + { + "scenario": "FederatedCredentials", + "reason": "Azure resource migration work in progress" + } +]