From 1c376d1bdbd3562b8d2655187f3ae55b536f322b Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Wed, 21 Aug 2024 09:32:36 +0200 Subject: [PATCH 01/11] Builddimension --- .../DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 | 4 ++++ Templates/AppSource App/.github/workflows/CICD.yaml | 4 ++-- Templates/Per Tenant Extension/.github/workflows/CICD.yaml | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 index 81afb5111..e0ed9268e 100644 --- a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 +++ b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 @@ -156,6 +156,8 @@ function CreateBuildDimensions { foreach($project in $projects) { $projectSettings = ReadSettings -project $project -baseFolder $baseFolder + $gitHubRunner = $projectSettings.githubRunner + $githubRunnerShell = $projectSettings.githubRunnerShell $buildModes = @($projectSettings.buildModes) if(!$buildModes) { @@ -168,6 +170,8 @@ function CreateBuildDimensions { project = $project projectName = $projectSettings.projectName buildMode = $buildMode + gitHubRunner = $gitHubRunner + githubRunnerShell = $githubRunnerShell } } } diff --git a/Templates/AppSource App/.github/workflows/CICD.yaml b/Templates/AppSource App/.github/workflows/CICD.yaml index d57c5c899..d1481f182 100644 --- a/Templates/AppSource App/.github/workflows/CICD.yaml +++ b/Templates/AppSource App/.github/workflows/CICD.yaml @@ -152,8 +152,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} diff --git a/Templates/Per Tenant Extension/.github/workflows/CICD.yaml b/Templates/Per Tenant Extension/.github/workflows/CICD.yaml index 3d9933ee4..ee26993aa 100644 --- a/Templates/Per Tenant Extension/.github/workflows/CICD.yaml +++ b/Templates/Per Tenant Extension/.github/workflows/CICD.yaml @@ -152,8 +152,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} From 23f8db36ae1b207209bca72781a5962cfba9fd6f Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 22 Aug 2024 11:15:15 +0200 Subject: [PATCH 02/11] test --- .../DetermineProjectsToBuild.psm1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 index e0ed9268e..4dce4d131 100644 --- a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 +++ b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 @@ -156,8 +156,8 @@ function CreateBuildDimensions { foreach($project in $projects) { $projectSettings = ReadSettings -project $project -baseFolder $baseFolder - $gitHubRunner = $projectSettings.githubRunner - $githubRunnerShell = $projectSettings.githubRunnerShell + #$gitHubRunner = $projectSettings.githubRunner + #$githubRunnerShell = $projectSettings.githubRunnerShell $buildModes = @($projectSettings.buildModes) if(!$buildModes) { @@ -170,8 +170,8 @@ function CreateBuildDimensions { project = $project projectName = $projectSettings.projectName buildMode = $buildMode - gitHubRunner = $gitHubRunner - githubRunnerShell = $githubRunnerShell + gitHubRunner = "windows-latest" + githubRunnerShell = "powershell" } } } From ba31f3566aa6ab74ffcf8bb0ae3879400b09b207 Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 22 Aug 2024 11:34:12 +0200 Subject: [PATCH 03/11] test --- .../DetermineProjectsToBuild.psm1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 index 4dce4d131..ae5eba7be 100644 --- a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 +++ b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 @@ -156,8 +156,8 @@ function CreateBuildDimensions { foreach($project in $projects) { $projectSettings = ReadSettings -project $project -baseFolder $baseFolder - #$gitHubRunner = $projectSettings.githubRunner - #$githubRunnerShell = $projectSettings.githubRunnerShell + $gitHubRunner = "windows-latest" #$projectSettings.githubRunner + $githubRunnerShell = "powershell" # $projectSettings.githubRunnerShell $buildModes = @($projectSettings.buildModes) if(!$buildModes) { @@ -170,8 +170,8 @@ function CreateBuildDimensions { project = $project projectName = $projectSettings.projectName buildMode = $buildMode - gitHubRunner = "windows-latest" - githubRunnerShell = "powershell" + gitHubRunner = $gitHubRunner + githubRunnerShell = $githubRunnerShell } } } From c84c4d784e4fc2b0398b5f1e2e3fb24a6182ace6 Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 22 Aug 2024 13:45:58 +0200 Subject: [PATCH 04/11] test --- Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 index ae5eba7be..0b27a8092 100644 --- a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 +++ b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 @@ -156,7 +156,7 @@ function CreateBuildDimensions { foreach($project in $projects) { $projectSettings = ReadSettings -project $project -baseFolder $baseFolder - $gitHubRunner = "windows-latest" #$projectSettings.githubRunner + $gitHubRunner = "windows-latest" | ConvertTo-Json -compress #$projectSettings.githubRunner $settings.githubRunner.Split(',').Trim() | ConvertTo-Json -compress $githubRunnerShell = "powershell" # $projectSettings.githubRunnerShell $buildModes = @($projectSettings.buildModes) From acca6aa648c8fd430bf225425844d91de9bf280d Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 22 Aug 2024 13:49:34 +0200 Subject: [PATCH 05/11] test --- .../DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 index 0b27a8092..42f12ecb8 100644 --- a/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 +++ b/Actions/DetermineProjectsToBuild/DetermineProjectsToBuild.psm1 @@ -156,8 +156,8 @@ function CreateBuildDimensions { foreach($project in $projects) { $projectSettings = ReadSettings -project $project -baseFolder $baseFolder - $gitHubRunner = "windows-latest" | ConvertTo-Json -compress #$projectSettings.githubRunner $settings.githubRunner.Split(',').Trim() | ConvertTo-Json -compress - $githubRunnerShell = "powershell" # $projectSettings.githubRunnerShell + $gitHubRunner = $projectSettings.githubRunner.Split(',').Trim() | ConvertTo-Json -compress + $githubRunnerShell = $projectSettings.githubRunnerShell $buildModes = @($projectSettings.buildModes) if(!$buildModes) { From 851683848aafb8ae113c4906192dc4d6bb42aa8b Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 22 Aug 2024 14:02:43 +0200 Subject: [PATCH 06/11] Always use pwsh on ubuntu --- Actions/AL-Go-Helper.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Actions/AL-Go-Helper.ps1 b/Actions/AL-Go-Helper.ps1 index 3c7fbdc03..e2e4dd549 100644 --- a/Actions/AL-Go-Helper.ps1 +++ b/Actions/AL-Go-Helper.ps1 @@ -768,6 +768,11 @@ function ReadSettings { if ($settings.shell -ne "powershell" -and $settings.shell -ne "pwsh") { throw "Invalid value for setting: shell: $($settings.githubRunnerShell)" } + if (($settings.githubRunner -like "ubuntu-*") -and ($settings.githubRunnerShell -eq "powershell")) { + Write-Host "Switching shell to pwsh for ubuntu" + $settings.githubRunnerShell = "pwsh" + } + if($settings.projectName -eq '') { $settings.projectName = $project # Default to project path as project name } From 0204ea91e10ec5975040b93412fd8c466b44eaa7 Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 22 Aug 2024 14:33:43 +0200 Subject: [PATCH 07/11] Update yamls --- Actions/AL-Go-TestRepoHelper.ps1 | 1 - Templates/AppSource App/.github/workflows/CICD.yaml | 2 -- Templates/AppSource App/.github/workflows/Current.yaml | 6 ++---- Templates/AppSource App/.github/workflows/NextMajor.yaml | 6 ++---- Templates/AppSource App/.github/workflows/NextMinor.yaml | 6 ++---- .../AppSource App/.github/workflows/PullRequestHandler.yaml | 6 ++---- .../Per Tenant Extension/.github/workflows/Current.yaml | 6 ++---- .../Per Tenant Extension/.github/workflows/NextMajor.yaml | 6 ++---- .../Per Tenant Extension/.github/workflows/NextMinor.yaml | 6 ++---- .../.github/workflows/PullRequestHandler.yaml | 6 ++---- 10 files changed, 16 insertions(+), 35 deletions(-) diff --git a/Actions/AL-Go-TestRepoHelper.ps1 b/Actions/AL-Go-TestRepoHelper.ps1 index 1b1b44a53..529d6fd95 100644 --- a/Actions/AL-Go-TestRepoHelper.ps1 +++ b/Actions/AL-Go-TestRepoHelper.ps1 @@ -66,7 +66,6 @@ function Test-SettingsJson { } if ($type -eq 'Project') { # GitHubRunner should not be in a project settings file (only read from repo or workflow settings) - Test-Property -settingsDescription $settingsDescription -json $json -key 'githubRunner' -shouldnot Test-Property -settingsDescription $settingsDescription -json $json -key 'bcContainerHelperVersion' -shouldnot } if ($type -eq 'Workflow') { diff --git a/Templates/AppSource App/.github/workflows/CICD.yaml b/Templates/AppSource App/.github/workflows/CICD.yaml index d1481f182..06ef57247 100644 --- a/Templates/AppSource App/.github/workflows/CICD.yaml +++ b/Templates/AppSource App/.github/workflows/CICD.yaml @@ -36,8 +36,6 @@ jobs: generateALDocArtifact: ${{ steps.DetermineDeploymentEnvironments.outputs.GenerateALDocArtifact }} deployALDocArtifact: ${{ steps.DetermineDeploymentEnvironments.outputs.DeployALDocArtifact }} deliveryTargetsJson: ${{ steps.DetermineDeliveryTargets.outputs.DeliveryTargetsJson }} - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} diff --git a/Templates/AppSource App/.github/workflows/Current.yaml b/Templates/AppSource App/.github/workflows/Current.yaml index a485d6601..b1071c316 100644 --- a/Templates/AppSource App/.github/workflows/Current.yaml +++ b/Templates/AppSource App/.github/workflows/Current.yaml @@ -22,8 +22,6 @@ jobs: needs: [ ] runs-on: [ windows-latest ] outputs: - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} @@ -75,8 +73,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} diff --git a/Templates/AppSource App/.github/workflows/NextMajor.yaml b/Templates/AppSource App/.github/workflows/NextMajor.yaml index 1f2d1fb65..03e6c37aa 100644 --- a/Templates/AppSource App/.github/workflows/NextMajor.yaml +++ b/Templates/AppSource App/.github/workflows/NextMajor.yaml @@ -22,8 +22,6 @@ jobs: needs: [ ] runs-on: [ windows-latest ] outputs: - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} @@ -75,8 +73,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} diff --git a/Templates/AppSource App/.github/workflows/NextMinor.yaml b/Templates/AppSource App/.github/workflows/NextMinor.yaml index ecc312651..400797c4a 100644 --- a/Templates/AppSource App/.github/workflows/NextMinor.yaml +++ b/Templates/AppSource App/.github/workflows/NextMinor.yaml @@ -22,8 +22,6 @@ jobs: needs: [ ] runs-on: [ windows-latest ] outputs: - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} @@ -75,8 +73,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} diff --git a/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml b/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml index 81bc40212..24058c88a 100644 --- a/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml +++ b/Templates/AppSource App/.github/workflows/PullRequestHandler.yaml @@ -35,8 +35,6 @@ jobs: if: (!failure() && !cancelled()) runs-on: [ windows-latest ] outputs: - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} @@ -90,8 +88,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} diff --git a/Templates/Per Tenant Extension/.github/workflows/Current.yaml b/Templates/Per Tenant Extension/.github/workflows/Current.yaml index a485d6601..b1071c316 100644 --- a/Templates/Per Tenant Extension/.github/workflows/Current.yaml +++ b/Templates/Per Tenant Extension/.github/workflows/Current.yaml @@ -22,8 +22,6 @@ jobs: needs: [ ] runs-on: [ windows-latest ] outputs: - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} @@ -75,8 +73,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} diff --git a/Templates/Per Tenant Extension/.github/workflows/NextMajor.yaml b/Templates/Per Tenant Extension/.github/workflows/NextMajor.yaml index 1f2d1fb65..03e6c37aa 100644 --- a/Templates/Per Tenant Extension/.github/workflows/NextMajor.yaml +++ b/Templates/Per Tenant Extension/.github/workflows/NextMajor.yaml @@ -22,8 +22,6 @@ jobs: needs: [ ] runs-on: [ windows-latest ] outputs: - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} @@ -75,8 +73,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} diff --git a/Templates/Per Tenant Extension/.github/workflows/NextMinor.yaml b/Templates/Per Tenant Extension/.github/workflows/NextMinor.yaml index ecc312651..400797c4a 100644 --- a/Templates/Per Tenant Extension/.github/workflows/NextMinor.yaml +++ b/Templates/Per Tenant Extension/.github/workflows/NextMinor.yaml @@ -22,8 +22,6 @@ jobs: needs: [ ] runs-on: [ windows-latest ] outputs: - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} @@ -75,8 +73,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} diff --git a/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml b/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml index 81bc40212..24058c88a 100644 --- a/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml +++ b/Templates/Per Tenant Extension/.github/workflows/PullRequestHandler.yaml @@ -35,8 +35,6 @@ jobs: if: (!failure() && !cancelled()) runs-on: [ windows-latest ] outputs: - githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} - githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} @@ -90,8 +88,8 @@ jobs: uses: ./.github/workflows/_BuildALGoProject.yaml secrets: inherit with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} - runsOn: ${{ needs.Initialization.outputs.githubRunner }} + shell: ${{ matrix.githubRunnerShell }} + runsOn: ${{ matrix.githubRunner }} checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} From b2a3dc18e257e6533926f7b54142b8f403b172fd Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Fri, 23 Aug 2024 15:55:51 +0200 Subject: [PATCH 08/11] Fix test --- Templates/AppSource App/.github/workflows/CICD.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Templates/AppSource App/.github/workflows/CICD.yaml b/Templates/AppSource App/.github/workflows/CICD.yaml index 06ef57247..d1481f182 100644 --- a/Templates/AppSource App/.github/workflows/CICD.yaml +++ b/Templates/AppSource App/.github/workflows/CICD.yaml @@ -36,6 +36,8 @@ jobs: generateALDocArtifact: ${{ steps.DetermineDeploymentEnvironments.outputs.GenerateALDocArtifact }} deployALDocArtifact: ${{ steps.DetermineDeploymentEnvironments.outputs.DeployALDocArtifact }} deliveryTargetsJson: ${{ steps.DetermineDeliveryTargets.outputs.DeliveryTargetsJson }} + githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }} + githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }} projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }} projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }} buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }} From 3560ab0bac220f07de02ca3b1e52d3875306b666 Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 29 Aug 2024 12:57:26 +0200 Subject: [PATCH 09/11] Update shell in Sign --- .../AppSource App/.github/workflows/_BuildALGoProject.yaml | 2 +- .../.github/workflows/_BuildALGoProject.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Templates/AppSource App/.github/workflows/_BuildALGoProject.yaml b/Templates/AppSource App/.github/workflows/_BuildALGoProject.yaml index 138d59271..4eb7be090 100644 --- a/Templates/AppSource App/.github/workflows/_BuildALGoProject.yaml +++ b/Templates/AppSource App/.github/workflows/_BuildALGoProject.yaml @@ -152,7 +152,7 @@ jobs: id: sign uses: microsoft/AL-Go-Actions/Sign@main with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} + shell: ${{ inputs.shell }} azureCredentialsJson: '${{ fromJson(steps.ReadSecrets.outputs.Secrets).AZURE_CREDENTIALS }}' pathToFiles: '${{ inputs.project }}/.buildartifacts/Apps/*.app' diff --git a/Templates/Per Tenant Extension/.github/workflows/_BuildALGoProject.yaml b/Templates/Per Tenant Extension/.github/workflows/_BuildALGoProject.yaml index 138d59271..4eb7be090 100644 --- a/Templates/Per Tenant Extension/.github/workflows/_BuildALGoProject.yaml +++ b/Templates/Per Tenant Extension/.github/workflows/_BuildALGoProject.yaml @@ -152,7 +152,7 @@ jobs: id: sign uses: microsoft/AL-Go-Actions/Sign@main with: - shell: ${{ needs.Initialization.outputs.githubRunnerShell }} + shell: ${{ inputs.shell }} azureCredentialsJson: '${{ fromJson(steps.ReadSecrets.outputs.Secrets).AZURE_CREDENTIALS }}' pathToFiles: '${{ inputs.project }}/.buildartifacts/Apps/*.app' From 63faf7c79c7e067e87c965a65ead238b76345880 Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 5 Sep 2024 11:13:34 +0200 Subject: [PATCH 10/11] Update comment --- Actions/AL-Go-TestRepoHelper.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Actions/AL-Go-TestRepoHelper.ps1 b/Actions/AL-Go-TestRepoHelper.ps1 index 529d6fd95..9293189ae 100644 --- a/Actions/AL-Go-TestRepoHelper.ps1 +++ b/Actions/AL-Go-TestRepoHelper.ps1 @@ -65,7 +65,7 @@ function Test-SettingsJson { Test-Property -settingsDescription $settingsDescription -json $json -key 'templateUrl' -should } if ($type -eq 'Project') { - # GitHubRunner should not be in a project settings file (only read from repo or workflow settings) + # Test for things that should / should not exist in a project settings file Test-Property -settingsDescription $settingsDescription -json $json -key 'bcContainerHelperVersion' -shouldnot } if ($type -eq 'Workflow') { From 77ea8c7835de00f93e469a03cb4a0827f945298d Mon Sep 17 00:00:00 2001 From: aholstrup1 Date: Thu, 5 Sep 2024 11:17:21 +0200 Subject: [PATCH 11/11] Update release notes --- RELEASENOTES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 0fa25815c..96df15282 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -2,6 +2,10 @@ - Issue 1184 Publish to Environment fails on 'Permission Denied' +### Allow GitHubRunner and GitHubRunnerShell as project settings + +Previously, AL-Go required the GitHubRunner and GitHubRunnerShell settings to be set on repository level. This has now been changed such that they can be set on project level. + ## v5.3 ### Issues