Skip to content

Commit 43effb3

Browse files
committed
[main@3b19800] Update AL-Go System Files from microsoft/AL-Go-AppSource@main - 1c3e324
1 parent 3b19800 commit 43effb3

26 files changed

Lines changed: 330 additions & 214 deletions

.AL-Go/cloudDevEnv.ps1

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,23 @@ $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-S
1515
function DownloadHelperFile {
1616
param(
1717
[string] $url,
18-
[string] $folder
18+
[string] $folder,
19+
[switch] $notifyAuthenticatedAttempt
1920
)
2021

2122
$prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue'
2223
$name = [System.IO.Path]::GetFileName($url)
2324
Write-Host "Downloading $name from $url"
2425
$path = Join-Path $folder $name
25-
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path
26+
try {
27+
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path
28+
}
29+
catch {
30+
if ($notifyAuthenticatedAttempt) {
31+
Write-Host -ForegroundColor Red "Failed to download $name, trying authenticated download"
32+
}
33+
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path -Headers @{ "Authorization" = "token $(gh auth token)" }
34+
}
2635
$ProgressPreference = $prevProgressPreference
2736
return $path
2837
}
@@ -42,12 +51,16 @@ Write-Host -ForegroundColor Yellow @'
4251

4352
$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())"
4453
New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null
45-
$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Github-Helper.psm1' -folder $tmpFolder
46-
$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/AL-Go-Helper.ps1' -folder $tmpFolder
47-
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json' -folder $tmpFolder | Out-Null
48-
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Packages.json' -folder $tmpFolder | Out-Null
54+
$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt
55+
$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/.Modules/ReadSettings.psm1' -folder $tmpFolder
56+
$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/.Modules/DebugLogHelper.psm1' -folder $tmpFolder
57+
$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/AL-Go-Helper.ps1' -folder $tmpFolder
58+
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null
59+
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/Environment.Packages.proj' -folder $tmpFolder | Out-Null
4960

5061
Import-Module $GitHubHelperPath
62+
Import-Module $ReadSettingsModule
63+
Import-Module $debugLoggingModule
5164
. $ALGoHelperPath -local
5265

5366
$baseFolder = GetBaseFolder -folder $PSScriptRoot

.AL-Go/localDevEnv.ps1

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,23 @@ $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-S
1919
function DownloadHelperFile {
2020
param(
2121
[string] $url,
22-
[string] $folder
22+
[string] $folder,
23+
[switch] $notifyAuthenticatedAttempt
2324
)
2425

2526
$prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue'
2627
$name = [System.IO.Path]::GetFileName($url)
2728
Write-Host "Downloading $name from $url"
2829
$path = Join-Path $folder $name
29-
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path
30+
try {
31+
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path
32+
}
33+
catch {
34+
if ($notifyAuthenticatedAttempt) {
35+
Write-Host -ForegroundColor Red "Failed to download $name, trying authenticated download"
36+
}
37+
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path -Headers @{ "Authorization" = "token $(gh auth token)" }
38+
}
3039
$ProgressPreference = $prevProgressPreference
3140
return $path
3241
}
@@ -46,12 +55,16 @@ Write-Host -ForegroundColor Yellow @'
4655

4756
$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())"
4857
New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null
49-
$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Github-Helper.psm1' -folder $tmpFolder
50-
$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/AL-Go-Helper.ps1' -folder $tmpFolder
51-
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json' -folder $tmpFolder | Out-Null
52-
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/Packages.json' -folder $tmpFolder | Out-Null
58+
$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt
59+
$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/.Modules/ReadSettings.psm1' -folder $tmpFolder
60+
$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/.Modules/DebugLogHelper.psm1' -folder $tmpFolder
61+
$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/AL-Go-Helper.ps1' -folder $tmpFolder
62+
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null
63+
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/Environment.Packages.proj' -folder $tmpFolder | Out-Null
5364

5465
Import-Module $GitHubHelperPath
66+
Import-Module $ReadSettingsModule
67+
Import-Module $debugLoggingModule
5568
. $ALGoHelperPath -local
5669

5770
$baseFolder = GetBaseFolder -folder $PSScriptRoot

.AL-Go/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/.Modules/settings.schema.json",
33
"country": "lt",
44
"doNotPublishApps": true,
55
"useCompilerFolder": true,

.github/AL-Go-Settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/.Modules/settings.schema.json",
33
"type": "AppSource App",
44
"templateUrl": "https://github.com/microsoft/AL-Go-AppSource@main",
5-
"templateSha": "b3a3eaef3f757c1dff5521fe21a618681ab53023",
5+
"templateSha": "1c3e3241f43c58b418c8bfccedbc5a9a75869e39",
66
"PartnerTelemetryConnectionString": "InstrumentationKey=5400e864-5abd-496c-837c-5fbea9914cb9;IngestionEndpoint=https://polandcentral-0.in.applicationinsights.azure.com/;LiveEndpoint=https://polandcentral.livediagnostics.monitor.azure.com/;ApplicationId=ccc6d211-3dd5-4ad1-8bec-db44e3dd9499",
77
"doNotRunBcptTests": true,
88
"doNotRunTests": true,

.github/RELEASENOTES.copy.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,74 @@
1+
## v7.3
2+
3+
### Configurable merge method for pull request auto-merge
4+
5+
A new setting `pullRequestMergeMethod` has been added to the `commitOptions` structure, allowing you to configure which merge method to use when `pullRequestAutoMerge` is enabled. Valid values are "merge" or "squash". The default value is "squash" to maintain backward compatibility.
6+
7+
Example
8+
9+
```json
10+
{
11+
"commitOptions": {
12+
"pullRequestAutoMerge": true,
13+
"pullRequestMergeMethod": "merge"
14+
}
15+
}
16+
```
17+
18+
### AL-Go Telemetry
19+
20+
AL-Go now offers a dataexplorer dashboard to get started with AL-Go telemetry. Additionally, we've updated the documentation to include a couple of kusto queries if you would rather build your own reports.
21+
22+
### Support for AL-Go settings as GitHub environment variable: ALGoEnvSettings
23+
24+
AL-Go settings can now be defined in GitHub environment variables. To use this feature, create a new variable under your GitHub environment called `ALGoEnvironmentSettings`. Please note that this variable should not include your environment name.
25+
26+
Settings loaded this way, will only be available during the Deploy step of the CI/CD or Publish to Environment actions, but not the Build step, making it most suitable for the [DeployTo setting](https://aka.ms/algosettings#deployto). Settings defined in this variable will take priority over any setting defined in AL-Go repo, org or settings files.
27+
28+
The contents of the variable should be a JSON block, similar to any other settings file or variable. When defining the `DeployTo\<EnvName>` setting in this variable, it should still include the environment name. Eg:
29+
30+
```
31+
{
32+
DeployToProduction {
33+
"Branches": [
34+
"*"
35+
],
36+
"includeTestAppsInSandboxEnvironment": false,
37+
"excludeAppIds": [ 1234 ]
38+
}
39+
}
40+
```
41+
42+
Please note, that due to certain security limitations, the properties `runs-on`, `shell` and `ContinousDeployment` of the `DeployTo` setting will <ins>**NOT**</ins> be respected if defined in a GitHub environment variable. To use these properties, please keep them defined elsewhere, such as your AL-Go settings file or Org/Repo settings variables.
43+
44+
### Issues
45+
46+
- Issue 1770 Wrong type of _projects_ setting in settings schema
47+
- Issue 1787 Publish to Environment from PR fails in private repos
48+
- Issue 1722 Check if apps are already installed on a higher version before deploying
49+
- Issue 1774 Increment Version Number with +0.1 can increment some version numbers twice
50+
- Issue 1837 Deployment from PR builds fail if PR branch name includes forward slashes (e.g., `feature/branch-name`).
51+
- Issue 1852 Page Scripting Tests are not added to build summary
52+
- Issue 1829 Added custom jobs cannot be removed
53+
- Idea 1856 Include workflow name as input for action ReadSetting
54+
55+
### Additional debug logging functionality
56+
57+
We have improved how logging is handled in AL-Go, and now make better use of GitHub built-in extended debug logging functionality. Extended debug logging can be enabled when re-running actions by clicking the 'Enable debug logging' checkbox in the pop-up window. This can be done both for jobs that failed and jobs that succeeded, but did not produce the correct result.
58+
59+
### Add custom jobs to AL-Go workflows
60+
61+
It is now possible to add custom jobs to AL-Go workflows. The Custom Job needs to be named `CustomJob<something>` and should be placed after all other jobs in the .yaml file. The order of which jobs are executed is determined by the Needs statements. Your custom job will be executed after all jobs specified in the Needs clause in your job and if you need the job to be executed before other jobs, you should add the job name in the Needs clause of that job. See [https://aka.ms/algosettings#customjobs](https://aka.ms/algosettings#customjobs) for details.
62+
63+
Note that custom jobs might break by future changes to AL-Go for GitHub workflows. If you have customizations to AL-Go for GitHub workflows, you should always doublecheck the pull request generated by Update AL-Go System Files.
64+
65+
### Support for Custom AL-Go template repositories
66+
67+
Create an AL-Go for GitHub repository based on [https://aka.ms/algopte](https://aka.ms/algopte) or [https://aka.ms/algoappsource](https://aka.ms/algoappsource), add custom workflows, custom jobs and/or settings to this repository and then use that repository as the template repository for other repositories. Using custom template repositories allows you to create and use highly customized template repositories and control the uptake of this in all repositories. See [https://aka.ms/algosettings#customtemplate](https://aka.ms/algosettings#customtemplate) for details.
68+
69+
> [!NOTE]
70+
> Customized repositories might break by future changes to AL-Go for GitHub. If you are customizing AL-Go for GitHub, you should always double-check the pull request when updating AL-Go system files in your custom template repositories.
71+
172
## v7.2
273

374
### Removed functionality

.github/Test Current.settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/settings.schema.json",
33
"artifact": "////latest",
44
"cacheImageName": "",
55
"versioningStrategy": 15

.github/Test Next Major.settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/settings.schema.json",
33
"artifact": "////nextmajor",
44
"cacheImageName": "",
55
"versioningStrategy": 15

.github/Test Next Minor.settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.2/settings.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v7.3/settings.schema.json",
33
"artifact": "////nextminor",
44
"cacheImageName": "",
55
"versioningStrategy": 15

.github/workflows/AddExistingAppOrTestApp.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,35 @@ jobs:
4141
runs-on: [ windows-latest ]
4242
steps:
4343
- name: Dump Workflow Information
44-
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.2
44+
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v7.3
4545
with:
4646
shell: powershell
4747

4848
- name: Checkout
49-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
49+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5050

5151
- name: Initialize the workflow
5252
id: init
53-
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.2
53+
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v7.3
5454
with:
5555
shell: powershell
5656

5757
- name: Read settings
58-
uses: microsoft/AL-Go-Actions/ReadSettings@v7.2
58+
uses: microsoft/AL-Go-Actions/ReadSettings@v7.3
5959
with:
6060
shell: powershell
6161

6262
- name: Read secrets
6363
id: ReadSecrets
64-
uses: microsoft/AL-Go-Actions/ReadSecrets@v7.2
64+
uses: microsoft/AL-Go-Actions/ReadSecrets@v7.3
6565
with:
6666
shell: powershell
6767
gitHubSecrets: ${{ toJson(secrets) }}
6868
getSecrets: 'TokenForPush'
6969
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}'
7070

7171
- name: Add existing app
72-
uses: microsoft/AL-Go-Actions/AddExistingApp@v7.2
72+
uses: microsoft/AL-Go-Actions/AddExistingApp@v7.3
7373
with:
7474
shell: powershell
7575
token: ${{ steps.ReadSecrets.outputs.TokenForPush }}
@@ -79,7 +79,7 @@ jobs:
7979

8080
- name: Finalize the workflow
8181
if: always()
82-
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.2
82+
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v7.3
8383
env:
8484
GITHUB_TOKEN: ${{ github.token }}
8585
with:

0 commit comments

Comments
 (0)