Skip to content

Commit dbce971

Browse files
Copilotmazhelez
andcommitted
Merge branch 'main' into copilot/fix-datetime-parsing-bug - resolve conflicts
Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
1 parent 5952fd6 commit dbce971

7 files changed

Lines changed: 48 additions & 26 deletions

File tree

Actions/DownloadProjectDependencies/DownloadProjectDependencies.Action.ps1

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,22 @@ $downloadedTestApps = @()
130130
$downloadedDependencies | ForEach-Object {
131131
# naming convention: app, (testapp)
132132
if ($_.startswith('(')) {
133-
$DownloadedTestApps += $_
133+
$downloadedTestApps += $_
134134
}
135135
else {
136-
$DownloadedApps += $_
136+
$downloadedApps += $_
137137
}
138138
}
139139

140140
OutputMessageAndArray -message "Downloaded dependencies (Apps)" -arrayOfStrings $downloadedApps
141141
OutputMessageAndArray -message "Downloaded dependencies (Test Apps)" -arrayOfStrings $downloadedTestApps
142142

143-
$DownloadedAppsJson = ConvertTo-Json $DownloadedApps -Depth 99 -Compress
144-
$DownloadedTestAppsJson = ConvertTo-Json $DownloadedTestApps -Depth 99 -Compress
143+
# Write the downloaded apps and test apps to temporary JSON files and set them as GitHub Action outputs
144+
$tempPath = NewTemporaryFolder
145+
$downloadedAppsJson = Join-Path $tempPath "DownloadedApps.json"
146+
$downloadedTestAppsJson = Join-Path $tempPath "DownloadedTestApps.json"
147+
ConvertTo-Json $downloadedApps -Depth 99 -Compress | Out-File -Encoding UTF8 -FilePath $downloadedAppsJson
148+
ConvertTo-Json $downloadedTestApps -Depth 99 -Compress | Out-File -Encoding UTF8 -FilePath $downloadedTestAppsJson
145149

146-
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedApps=$DownloadedAppsJson"
147-
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedTestApps=$DownloadedTestAppsJson"
150+
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedApps=$downloadedAppsJson"
151+
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedTestApps=$downloadedTestAppsJson"

Actions/DownloadProjectDependencies/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ The action constructs arrays of paths to .app files, that are dependencies of th
3737

3838
| Name | Description |
3939
| :-- | :-- |
40-
| DownloadedApps | A JSON-formatted list of paths to .app files, that dependencies of the apps |
41-
| DownloadedTestApps | A JSON-formatted list of paths to .app files, that dependencies of the test apps |
40+
| DownloadedApps | A path to a JSON-formatted list of apps to install |
41+
| DownloadedTestApps | A path to a JSON-formatted list of test apps to install |

Actions/DownloadProjectDependencies/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ inputs:
2121
default: '0'
2222
outputs:
2323
DownloadedApps:
24-
description: A JSON-formatted array of paths to .app files of the apps that were downloaded
24+
description: A path to a JSON-formatted list of apps to install
2525
value: ${{ steps.DownloadDependencies.outputs.DownloadedApps }}
2626
DownloadedTestApps:
27-
description: A JSON-formatted array of paths to .app files of the test apps that were downloaded
27+
description: A path to a JSON-formatted list of test apps to install
2828
value: ${{ steps.DownloadDependencies.outputs.DownloadedTestApps }}
2929
runs:
3030
using: composite

Actions/RunPipeline/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Run pipeline in AL-Go repository
2020
| artifact | | ArtifactUrl to use for the build | settings.artifact |
2121
| project | | Project name if the repository is setup for multiple projects | . |
2222
| buildMode | | Specifies a mode to use for the build steps | Default |
23-
| installAppsJson | | A JSON-formatted list of apps to install | [] |
24-
| installTestAppsJson | | A JSON-formatted list of test apps to install | [] |
23+
| installAppsJson | | A path to a JSON-formatted list of apps to install | '' |
24+
| installTestAppsJson | | A path to a JSON-formatted list of test apps to install | '' |
2525
| baselineWorkflowRunId | RunId of the baseline workflow run | |
2626
| baselineWorkflowSHA | SHA of the baseline workflow run | |
2727

Actions/RunPipeline/RunPipeline.ps1

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Param(
77
[string] $project = "",
88
[Parameter(HelpMessage = "Specifies a mode to use for the build steps", Mandatory = $false)]
99
[string] $buildMode = 'Default',
10-
[Parameter(HelpMessage = "A JSON-formatted list of apps to install", Mandatory = $false)]
11-
[string] $installAppsJson = '[]',
12-
[Parameter(HelpMessage = "A JSON-formatted list of test apps to install", Mandatory = $false)]
13-
[string] $installTestAppsJson = '[]',
10+
[Parameter(HelpMessage = "A path to a JSON-formatted list of apps to install", Mandatory = $false)]
11+
[string] $installAppsJson = '',
12+
[Parameter(HelpMessage = "A path to a JSON-formatted list of test apps to install", Mandatory = $false)]
13+
[string] $installTestAppsJson = '',
1414
[Parameter(HelpMessage = "RunId of the baseline workflow run", Mandatory = $false)]
1515
[string] $baselineWorkflowRunId = '0',
1616
[Parameter(HelpMessage = "SHA of the baseline workflow run", Mandatory = $false)]
@@ -187,8 +187,26 @@ try {
187187
}
188188

189189
$install = @{
190-
"Apps" = $settings.installApps + @($installAppsJson | ConvertFrom-Json)
191-
"TestApps" = $settings.installTestApps + @($installTestAppsJson | ConvertFrom-Json)
190+
"Apps" = $settings.installApps
191+
"TestApps" = $settings.installTestApps
192+
}
193+
194+
if ($installAppsJson -and (Test-Path $installAppsJson)) {
195+
try {
196+
$install.Apps += @(Get-Content -Path $installAppsJson -Raw | ConvertFrom-Json)
197+
}
198+
catch {
199+
throw "Failed to parse JSON file at path '$installAppsJson'. Error: $($_.Exception.Message)"
200+
}
201+
}
202+
203+
if ($installTestAppsJson -and (Test-Path $installTestAppsJson)) {
204+
try {
205+
$install.TestApps += @(Get-Content -Path $installTestAppsJson -Raw | ConvertFrom-Json)
206+
}
207+
catch {
208+
throw "Failed to parse JSON file at path '$installTestAppsJson'. Error: $($_.Exception.Message)"
209+
}
192210
}
193211

194212
# Replace secret names in install.apps and install.testApps

Actions/RunPipeline/action.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ inputs:
2222
required: false
2323
default: 'Default'
2424
installAppsJson:
25-
description: A JSON-formatted list of apps to install
25+
description: A path to a JSON-formatted list of apps to install
2626
required: false
27-
default: '[]'
27+
default: ''
2828
installTestAppsJson:
29-
description: A JSON-formatted list of test apps to install
29+
description: A path to a JSON-formatted list of test apps to install
3030
required: false
31-
default: '[]'
31+
default: ''
3232
baselineWorkflowRunId:
3333
description: RunId of the baseline workflow run
3434
required: false

RELEASENOTES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
## AL-Go Telemetry updates
2-
3-
AL-Go telemetry now includes test results so you can more easily see how many AL tests, Page Scripting tests and BCPT tests ran in your workflows across all your repositories. Documentation for this can be found on [this article](https://github.com/microsoft/AL-Go/blob/main/Scenarios/EnablingTelemetry.md) on enabling telemetry.
4-
51
### Issues
62

73
- Issue 2045 DateTime parsing fails on non-US locale runners in WorkflowPostProcess.ps1
4+
- AL-Go repositories with large amounts of projects may run into issues with too large environment variables
85

6+
## AL-Go Telemetry updates
7+
8+
AL-Go telemetry now includes test results so you can more easily see how many AL tests, Page Scripting tests and BCPT tests ran in your workflows across all your repositories. Documentation for this can be found on [this article](https://github.com/microsoft/AL-Go/blob/main/Scenarios/EnablingTelemetry.md) on enabling telemetry.
99
## v8.1
1010

1111
### Custom AL-Go files

0 commit comments

Comments
 (0)