Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,22 @@ $downloadedTestApps = @()
$downloadedDependencies | ForEach-Object {
# naming convention: app, (testapp)
if ($_.startswith('(')) {
$DownloadedTestApps += $_
$downloadedTestApps += $_
}
else {
$DownloadedApps += $_
$downloadedApps += $_
}
}

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

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

Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedApps=$DownloadedAppsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedTestApps=$DownloadedTestAppsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedApps=$downloadedAppsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedTestApps=$downloadedTestAppsJson"
4 changes: 2 additions & 2 deletions Actions/DownloadProjectDependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ The action constructs arrays of paths to .app files, that are dependencies of th

| Name | Description |
| :-- | :-- |
| DownloadedApps | A JSON-formatted list of paths to .app files, that dependencies of the apps |
| DownloadedTestApps | A JSON-formatted list of paths to .app files, that dependencies of the test apps |
| DownloadedApps | A path to a JSON-formatted list of apps to install |
| DownloadedTestApps | A path to a JSON-formatted list of test apps to install |
4 changes: 2 additions & 2 deletions Actions/DownloadProjectDependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ inputs:
default: '0'
outputs:
DownloadedApps:
description: A JSON-formatted array of paths to .app files of the apps that were downloaded
description: A path to a JSON-formatted list of apps to install
value: ${{ steps.DownloadDependencies.outputs.DownloadedApps }}
DownloadedTestApps:
description: A JSON-formatted array of paths to .app files of the test apps that were downloaded
description: A path to a JSON-formatted list of test apps to install
value: ${{ steps.DownloadDependencies.outputs.DownloadedTestApps }}
runs:
using: composite
Expand Down
4 changes: 2 additions & 2 deletions Actions/RunPipeline/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Run pipeline in AL-Go repository
| artifact | | ArtifactUrl to use for the build | settings.artifact |
| project | | Project name if the repository is setup for multiple projects | . |
| buildMode | | Specifies a mode to use for the build steps | Default |
| installAppsJson | | A JSON-formatted list of apps to install | [] |
| installTestAppsJson | | A JSON-formatted list of test apps to install | [] |
| installAppsJson | | A path to a JSON-formatted list of apps to install | '' |
| installTestAppsJson | | A path to a JSON-formatted list of test apps to install | '' |
| baselineWorkflowRunId | RunId of the baseline workflow run | |
| baselineWorkflowSHA | SHA of the baseline workflow run | |

Expand Down
30 changes: 24 additions & 6 deletions Actions/RunPipeline/RunPipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Param(
[string] $project = "",
[Parameter(HelpMessage = "Specifies a mode to use for the build steps", Mandatory = $false)]
[string] $buildMode = 'Default',
[Parameter(HelpMessage = "A JSON-formatted list of apps to install", Mandatory = $false)]
[string] $installAppsJson = '[]',
[Parameter(HelpMessage = "A JSON-formatted list of test apps to install", Mandatory = $false)]
[string] $installTestAppsJson = '[]',
[Parameter(HelpMessage = "A path to a JSON-formatted list of apps to install", Mandatory = $false)]
[string] $installAppsJson = '',
[Parameter(HelpMessage = "A path to a JSON-formatted list of test apps to install", Mandatory = $false)]
[string] $installTestAppsJson = '',
[Parameter(HelpMessage = "RunId of the baseline workflow run", Mandatory = $false)]
[string] $baselineWorkflowRunId = '0',
[Parameter(HelpMessage = "SHA of the baseline workflow run", Mandatory = $false)]
Expand Down Expand Up @@ -187,8 +187,26 @@ try {
}

$install = @{
"Apps" = $settings.installApps + @($installAppsJson | ConvertFrom-Json)
"TestApps" = $settings.installTestApps + @($installTestAppsJson | ConvertFrom-Json)
"Apps" = $settings.installApps
"TestApps" = $settings.installTestApps
}

if ($installAppsJson -and (Test-Path $installAppsJson)) {
try {
$install.Apps += @(Get-Content -Path $installAppsJson -Raw | ConvertFrom-Json)
}
catch {
throw "Failed to parse JSON file at path '$installAppsJson'. Error: $($_.Exception.Message)"
}
}

if ($installTestAppsJson -and (Test-Path $installTestAppsJson)) {
try {
$install.TestApps += @(Get-Content -Path $installTestAppsJson -Raw | ConvertFrom-Json)
}
catch {
throw "Failed to parse JSON file at path '$installTestAppsJson'. Error: $($_.Exception.Message)"
}
}

# Replace secret names in install.apps and install.testApps
Expand Down
8 changes: 4 additions & 4 deletions Actions/RunPipeline/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ inputs:
required: false
default: 'Default'
installAppsJson:
description: A JSON-formatted list of apps to install
description: A path to a JSON-formatted list of apps to install
required: false
default: '[]'
default: ''
installTestAppsJson:
description: A JSON-formatted list of test apps to install
description: A path to a JSON-formatted list of test apps to install
required: false
default: '[]'
default: ''
baselineWorkflowRunId:
description: RunId of the baseline workflow run
required: false
Expand Down
4 changes: 4 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Issues

- AL-Go repositories with large amounts of projects may run into issues with too large environment variables

## AL-Go Telemetry updates

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.
Expand Down
Loading