Skip to content

Commit

Permalink
Revert latest AL-Go uptake (#3025)
Browse files Browse the repository at this point in the history
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Revert latest AL-Go uptake

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#566498](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/566498)
  • Loading branch information
aholstrup1 authored Feb 21, 2025
1 parent 64ee2e5 commit 9e440c7
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 211 deletions.
9 changes: 1 addition & 8 deletions .github/AL-Go-Settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,12 @@
]
},
"UpdateALGoSystemFilesEnvironment": "Official-Build",
"templateSha": "4c9ea6f8e445c270e93ff18ec7cf07153256ec8f",
"templateSha": "b608fc6787759aaac18f1407750c3436b6553b88",
"commitOptions": {
"messageSuffix": "Related to AB#539394",
"pullRequestAutoMerge": true,
"pullRequestLabels": [
"Automation"
]
},
"incrementalBuilds": {
"onPush": false,
"onPull_Request": true,
"onSchedule": false,
"retentionDays": 30,
"mode": "modifiedProjects"
}
}
60 changes: 2 additions & 58 deletions .github/RELEASENOTES.copy.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,3 @@
## preview

Note that when using the preview version of AL-Go for GitHub, we recommend you Update your AL-Go system files, as soon as possible when informed that an update is available.

### Deprecations

- `alwaysBuildAllProjects` will be removed after October 1st 2025. Please set the `onPull_Request` property of the `incrementalBuilds` setting to false to force full builds in Pull Requests.
- `<workflow>Schedule` will be removed after October 1st 2025. The old setting, where the setting key was a combination of the workflow name and `Schedule` (dynamic setting key name) is deprecated. Instead you need to use a setting called [workflowSchedule](https://aka.ms/algosettings#workflowSchedule) and either use [Conditional Settings](https://aka.ms/algosettings#conditional-settings) or place the setting in a workflow specific settings file.

### Issues

- Issue 1433 Publish to Environment - DependencyInstallMode not found
- Issue 1440 Create Release fails due to recent changes to the AL-Go
- Issue 1330 CompilerFolder doesn't transfer installed Apps to NuGet resolution
- Issue 1268 Do not throw an un-understandable error during nuGet download
- Performance test sample code in 25.4 contains objects with ID 149201 and 149202, which are not renumbered

### New Workflow specific settings

- `workflowSchedule` - can be structure with a property named `cron`, which must be a valid crontab, defining the CRON schedule for when the specified workflow should run. Default is no scheduled runs, only manual triggers. Build your crontab string here: [https://crontab.guru](https://crontab.guru). You need to run the Update AL-Go System Files workflow for the schedule to take effect.<br/>**Note:** If you configure a WorkflowSchedule for the CI/CD workflow, AL-Go will stop triggering CICDs on push unless you have also added CICDPushBranches to your settings.<br/>**Note also:** If you define a schedule for Update AL-Go System Files, it uses direct Commit instead of creating a PR.
- `workflowConcurrency` - is used to control concurrency of workflows. Like with the `workflowSchedule` setting, this setting should be applied in workflow specific settings files or conditional settings. By default, all workflows allows for concurrency, except for the Create Release workflow. If you are using incremental builds in CI/CD it is also recommented to set WorkflowConcurrency to:<br/>`[ "group: ${{ github.workflow }}-${{ github.ref }}", "cancel-in-progress: true" ]`<br />in order to cancel prior incremental builds on the same branch.<br />Read more about workflow concurrency [here](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs).

### New Repository Settings

- `deployTo<environment>` now has two additional properties:
- `includeTestAppsInSandboxEnvironment`, which deploys test apps and their dependencies to the specified sandbox environment if set to `true`. Deployment will fail if used on a Prod environment or if the test app has a dependency on Tests-TestLibraries. Default value is `false`.
- `excludeAppIds`, which is an array of app ids which will be excluded from deployment. Default value is `[]`
- `incrementalBuilds` - is a structure defining how you want AL-Go to handle incremental builds. When using incremental builds for a build, AL-Go will look for the latest successful build, newer than the defined `retentionDays` and only rebuild projects or apps (based on `mode`) which needs to be rebuilt. Properties in the structure includes:
- `onPush` - set this property to **true** in order to enable incremental builds in CI/CD triggered by a merge/push event. Default is **false**.
- `onPull_Request` - set this property to **false** in order to disable incremental builds in Pull Request workflows. Default is **true**.
- `onSchedule` - set this property to **true** in order to enable incremental builds in CI/CD when running on a schedule. Default is **false**.
- `retentionDays` - number of days a successful build is good (and can be used for incremental builds). Default is **30**.
- `mode` - defines the mode for incremental builds. Currently, two values are supported. Use **modifiedProjects** when you want to rebuild all apps in modified projects and depending projects or **modifiedApps** if you only want to rebuild modified apps and depending apps.

> [!NOTE]
> The projects mentioned here are AL-Go projects in a multi-project repository. A repository can contain multiple projects and a project can contain multiple apps.
### Support for incremental builds

AL-Go for GitHub now supports incremental builds, which means that unchanged projects or apps will be reused from the previous good build. Read [this](aka.ms/algosettings#incrementalBuilds) to learn more.

> [!NOTE]
> When using incremental builds it is recommended to also set `workflowConcurrency` as defined [here](https://aka.ms/algosettings#workflowConcurrency).
### Support for GitHub App authentication

AL-Go for GitHub now supports using a GitHub App specification as the GhTokenWorkflow secret for a more secure way of allowing repositories to run Update AL-Go System Files and other workflows which are creating commits and pull requests. See [this description](https://github.com/microsoft/AL-Go/blob/main/Scenarios/GhTokenWorkflow.md) to learn how to use GitHub App authentication.

### Support for embedded secrets in installApps and installTestApps settings

If your installApps or installTestApps are secure URL, containing a secret token, you can now use a GitHub secret specification as part of or as the full URL of apps to install. An example could be:

`"installApps": [ "https://www.dropbox.com/${{SECRETNAME}}&dl=1" ]`

Which would hide the secret part of your URL instead of exposing it in clear text.

## v6.3

### Deprecations
Expand Down Expand Up @@ -192,7 +136,7 @@ In the summary after a Test Run, you now also have the result of performance tes
### Support Ubuntu runners for all AL-Go workflows

Previously, the workflows "Update AL-Go System Files" and "TroubleShooting" were hardcoded to always run on `windows-latest` to prevent deadlocks and security issues.
From now on, `ubuntu-latest` will also be allowed for these mission critical workflows, when changing the `runs-on` setting. Additionally, only the value `pwsh` for `shell` setting is allowed when using `ubuntu-latest` runners.
From now on, `ubuntu-lates` will also be allowed for these mission critical workflows, when changing the `runs-on` setting. Additionally, only the value `pwsh` for `shell` setting is allowed when using `ubuntu-latest` runners.

### Updated AL-Go telemetry

Expand Down Expand Up @@ -685,7 +629,7 @@ In the latest version, we always use LF as line seperator, UTF8 without BOM and
### Experimental Support

Setting the repo setting "shell" to "pwsh", followed by running Update AL-Go System Files, will cause all PowerShell code to be run using PowerShell 7 instead of PowerShell 5. This functionality is experimental. Please report any issues at https://github.com/microsoft/AL-Go/issues
Setting the repo setting "runs-on" to "Ubuntu-latest", followed by running Update AL-Go System Files, will cause all non-build jobs to run using Linux. This functionality is experimental. Please report any issues at https://github.com/microsoft/AL-Go/issues
Setting the repo setting "runs-on" to "Ubuntu-Latest", followed by running Update AL-Go System Files, will cause all non-build jobs to run using Linux. This functionality is experimental. Please report any issues at https://github.com/microsoft/AL-Go/issues

## v2.2

Expand Down
53 changes: 22 additions & 31 deletions .github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@ jobs:
githubRunner: ${{ steps.ReadSettings.outputs.GitHubRunnerJson }}
githubRunnerShell: ${{ steps.ReadSettings.outputs.GitHubRunnerShell }}
projects: ${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}
skippedProjects: ${{ steps.determineProjectsToBuild.outputs.SkippedProjectsJson }}
projectDependenciesJson: ${{ steps.determineProjectsToBuild.outputs.ProjectDependenciesJson }}
buildOrderJson: ${{ steps.determineProjectsToBuild.outputs.BuildOrderJson }}
baselineWorkflowRunId: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowRunId }}
baselineWorkflowSHA: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowSHA }}
workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }}
powerPlatformSolutionFolder: ${{ steps.DeterminePowerPlatformSolutionFolder.outputs.powerPlatformSolutionFolder }}
workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }}
steps:
- name: Dump Workflow Information
uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v6.3
with:
shell: powershell

Expand All @@ -59,21 +56,21 @@ jobs:

- name: Initialize the workflow
id: init
uses: microsoft/AL-Go/Actions/WorkflowInitialize@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.3
with:
shell: powershell

- name: Read settings
id: ReadSettings
uses: microsoft/AL-Go/Actions/ReadSettings@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSettings@v6.3
with:
shell: powershell
get: type,powerPlatformSolutionFolder,useGitSubmodules

- name: Read submodules token
id: ReadSubmodulesToken
if: env.useGitSubmodules != 'false' && env.useGitSubmodules != ''
uses: microsoft/AL-Go/Actions/ReadSecrets@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSecrets@v6.3
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
Expand All @@ -94,7 +91,7 @@ jobs:
- name: Determine Projects To Build
id: determineProjectsToBuild
uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/DetermineProjectsToBuild@v6.3
with:
shell: powershell
maxBuildDepth: ${{ env.workflowDepth }}
Expand All @@ -107,23 +104,23 @@ jobs:
- name: Determine Delivery Target Secrets
id: DetermineDeliveryTargetSecrets
uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v6.3
with:
shell: powershell
projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}'
checkContextSecrets: 'false'

- name: Read secrets
id: ReadSecrets
uses: microsoft/AL-Go/Actions/ReadSecrets@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSecrets@v6.3
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: ${{ steps.DetermineDeliveryTargetSecrets.outputs.ContextSecrets }}

- name: Determine Delivery Targets
id: DetermineDeliveryTargets
uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/DetermineDeliveryTargets@v6.3
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand All @@ -133,7 +130,7 @@ jobs:

- name: Determine Deployment Environments
id: DetermineDeploymentEnvironments
uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v6.3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand All @@ -149,13 +146,13 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Read settings
uses: microsoft/AL-Go/Actions/ReadSettings@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSettings@v6.3
with:
shell: powershell
get: templateUrl

- name: Check for updates to AL-Go system files
uses: microsoft/AL-Go/Actions/CheckForUpdates@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/CheckForUpdates@v6.3
with:
shell: powershell
templateUrl: ${{ env.templateUrl }}
Expand All @@ -177,10 +174,7 @@ jobs:
project: ${{ matrix.project }}
projectName: ${{ matrix.projectName }}
buildMode: ${{ matrix.buildMode }}
skippedProjectsJson: ${{ needs.Initialization.outputs.skippedProjects }}
projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }}
baselineWorkflowRunId: ${{ needs.Initialization.outputs.baselineWorkflowRunId }}
baselineWorkflowSHA: ${{ needs.Initialization.outputs.baselineWorkflowSHA }}
secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString'
signArtifacts: true
useArtifactCache: true
Expand All @@ -201,10 +195,7 @@ jobs:
project: ${{ matrix.project }}
projectName: ${{ matrix.projectName }}
buildMode: ${{ matrix.buildMode }}
skippedProjectsJson: ${{ needs.Initialization.outputs.skippedProjects }}
projectDependenciesJson: ${{ needs.Initialization.outputs.projectDependenciesJson }}
baselineWorkflowRunId: ${{ needs.Initialization.outputs.baselineWorkflowRunId }}
baselineWorkflowSHA: ${{ needs.Initialization.outputs.baselineWorkflowSHA }}
secrets: 'licenseFileUrl,codeSignCertificateUrl,*codeSignCertificatePassword,keyVaultCertificateUrl,*keyVaultCertificatePassword,keyVaultClientId,gitHubPackagesContext,applicationInsightsConnectionString'
signArtifacts: true
useArtifactCache: true
Expand Down Expand Up @@ -232,7 +223,7 @@ jobs:
path: '.artifacts'

- name: Read settings
uses: microsoft/AL-Go/Actions/ReadSettings@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSettings@v6.3
with:
shell: powershell

Expand All @@ -241,7 +232,7 @@ jobs:
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0

- name: Build Reference Documentation
uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v6.3
with:
shell: powershell
artifacts: '.artifacts'
Expand Down Expand Up @@ -278,7 +269,7 @@ jobs:
path: '.artifacts'

- name: Read settings
uses: microsoft/AL-Go/Actions/ReadSettings@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSettings@v6.3
with:
shell: ${{ matrix.shell }}
get: type,powerPlatformSolutionFolder
Expand All @@ -292,15 +283,15 @@ jobs:
- name: Read secrets
id: ReadSecrets
uses: microsoft/AL-Go/Actions/ReadSecrets@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSecrets@v6.3
with:
shell: ${{ matrix.shell }}
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext'

- name: Deploy to Business Central
id: Deploy
uses: microsoft/AL-Go/Actions/Deploy@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/Deploy@v6.3
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand All @@ -312,7 +303,7 @@ jobs:

- name: Deploy to Power Platform
if: env.type == 'PTE' && env.powerPlatformSolutionFolder != ''
uses: microsoft/AL-Go/Actions/DeployPowerPlatform@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/DeployPowerPlatform@v6.3
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand Down Expand Up @@ -340,20 +331,20 @@ jobs:
path: '.artifacts'

- name: Read settings
uses: microsoft/AL-Go/Actions/ReadSettings@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSettings@v6.3
with:
shell: powershell

- name: Read secrets
id: ReadSecrets
uses: microsoft/AL-Go/Actions/ReadSecrets@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSecrets@v6.3
with:
shell: powershell
gitHubSecrets: ${{ toJson(secrets) }}
getSecrets: '${{ matrix.deliveryTarget }}Context'

- name: Deliver
uses: microsoft/AL-Go/Actions/Deliver@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/Deliver@v6.3
env:
Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}'
with:
Expand All @@ -373,7 +364,7 @@ jobs:

- name: Finalize the workflow
id: PostProcess
uses: microsoft/AL-Go/Actions/WorkflowPostProcess@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/DeployReferenceDocumentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ jobs:

- name: Initialize the workflow
id: init
uses: microsoft/AL-Go/Actions/WorkflowInitialize@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v6.3
with:
shell: powershell

- name: Read settings
uses: microsoft/AL-Go/Actions/ReadSettings@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/ReadSettings@v6.3
with:
shell: powershell

- name: Determine Deployment Environments
id: DetermineDeploymentEnvironments
uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/DetermineDeploymentEnvironments@v6.3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand All @@ -54,7 +54,7 @@ jobs:
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0

- name: Build Reference Documentation
uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/BuildReferenceDocumentation@v6.3
with:
shell: powershell
artifacts: 'latest'
Expand All @@ -71,7 +71,7 @@ jobs:

- name: Finalize the workflow
if: always()
uses: microsoft/AL-Go/Actions/WorkflowPostProcess@7c4fec6c2547eee4eb1db58a1d52076dcda88ce2
uses: microsoft/AL-Go-Actions/WorkflowPostProcess@v6.3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand Down
Loading

0 comments on commit 9e440c7

Please sign in to comment.