diff --git a/.github/AL-Go-Settings.json b/.github/AL-Go-Settings.json index f846c80..2227d7f 100644 --- a/.github/AL-Go-Settings.json +++ b/.github/AL-Go-Settings.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/settings.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json", "type": "AppSource App", "templateUrl": "https://github.com/microsoft/AL-Go-AppSource@preview", "runs-on": "ubuntu-latest", @@ -25,5 +25,5 @@ "CertificateProfile": "BCCodeSigningPublic" }, "trackALAlertsInGitHub": true, - "templateSha": "975f426167ed623761777eb2560ee7ec7ce0ab5d" + "templateSha": "72a58221eda801ef92d4fd8dead7647bf62d9101" } diff --git a/.github/RELEASENOTES.copy.md b/.github/RELEASENOTES.copy.md index 4d757eb..6afaf8c 100644 --- a/.github/RELEASENOTES.copy.md +++ b/.github/RELEASENOTES.copy.md @@ -2,6 +2,110 @@ 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. +### Issues + +- Issue 2095 DeliverToAppSource.ProductId needs to be specified (Library app) +- Issue 2082 Sign action no longer fails when repository is empty or no artifacts are generated +- Issue 2078 Workflows run since January 14th '26 have space before CI/CD removed +- Issue 2070 Support public GitHub Packages feeds without requiring a Personal Access Token (PAT) +- Issue 2004 PublishToAppSource workflow publishes multi-app repos in alphabetical order instead of dependency order +- Issue 2045 DateTime parsing fails on non-US locale runners in WorkflowPostProcess.ps1 +- Issue 2055 When using versioningStrategy 3+16, you get an error when building +- Issue 2094 PR into release branch gets wrong previous release +- AL-Go repositories with large amounts of projects may run into issues with too large environment variables +- Discussion 1855 Add trigger 'workflow_call' to workflow 'Update AL-Go System Files' for reusability +- Issue 2050 Publish To Environment creates mistyped environment + +### Publish To Environment no longer creates unknown environments by default + +Previously, when running the "Publish To Environment" workflow with an environment name that doesn't exist in GitHub or AL-Go settings, the workflow would automatically create a new GitHub environment. This could lead to problems when environment names were mistyped, as the bogus environment would then cause subsequent CI/CD workflows to fail. + +Now, the workflow will fail with a clear error message if the specified environment doesn't exist. If you intentionally want to deploy to a new environment that hasn't been configured yet, you can check the **Create environment if it does not exist** checkbox when running the workflow. + +### Set default values for workflow inputs + +The `workflowDefaultInputs` setting now also applies to `workflow_call` inputs when an input with the same name exists for `workflow_dispatch`. +This ensures consistent default values across both manual workflow runs and reusable workflow calls. + +Read more at [workflowDefaultInputs](https://aka.ms/algosettings#workflowDefaultInputs). + +### Merge queue support + +AL-Go now supports GitHub's merge queue feature out of the box! The `merge_group` trigger has been added to the Pull Request Build workflow, enabling seamless integration with merge queues. When you have the merge queue feature enabled in your repo, multiple PRs will automatically be validated together. Read more about merge queues [here](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue). + +> [!WARNING] +> If you rely on a custom workflow for merge queue validation, you may need to adjust your setup to avoid duplicate builds. + +### 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. + +## v8.1 + +### Custom AL-Go files + +AL-Go for GitHub now supports updating files from your custom templates via the new `customALGoFiles` setting. Read more at [customALGoFiles](https://aka.ms/algosettings#customALGoFiles). + +### Set default values for workflow inputs + +A new setting `workflowDefaultInputs` allows you to configure default values for workflow_dispatch inputs. This makes it easier to run workflows manually with consistent settings across your team. + +When you add this setting to your AL-Go settings file and run the "Update AL-Go System Files" workflow, the default values will be automatically applied to the workflow YAML files in your repository. +The default values must match the input types (boolean, number, string, or choice) defined in the workflow YAML files. + +Example configuration: + +```json +{ + "workflowDefaultInputs": [ + { "name": "directCommit", "value": true }, + { "name": "useGhTokenWorkflow", "value": true } + ] +} +``` + +This setting can be used on its own in repository settings to apply defaults to all workflows with matching input names. Alternatively, you can use it within [conditional settings](https://aka.ms/algosettings#conditional-settings) to apply defaults only to specific workflows, branches, or other conditions. + +Example using conditional settings to target specific workflows: + +```json +{ + "conditionalSettings": [ + { + "workflows": ["Create Release"], + "settings": { + "workflowDefaultInputs": [ + { "name": "directCommit", "value": true }, + { "name": "releaseType", "value": "Prerelease" } + ] + } + } + ] +} +``` + +**Important:** When multiple conditional settings blocks match and both define `workflowDefaultInputs`, the arrays are merged following AL-Go's standard behavior for complex setting types (all entries are kept). If the same input name appears in multiple entries, the last matching entry takes precedence. + +Read more at [workflowDefaultInputs](https://aka.ms/algosettings#workflowDefaultInputs). + +### Issues + +- Issue 2039 Error when deploy to environment: NewTemporaryFolder is not recognized +- Issue 1961 KeyVault access in PR pipeline +- Discussion 1911 Add support for reportSuppressedDiagnostics +- Discussion 1968 Parameter for settings passed to CreateDevEnv +- Issue 1945 Deploy Reference Documentation fails for CI/CD +- Use Runner_Temp instead of GetTempFolder whenever possible +- Issue 2016 Running Update AL-Go system files with branches wildcard `*` tries to update _origin_ +- Issue 1960 Deploy Reference Documentation fails +- Discussion 1952 Set default values on workflow_dispatch input + +### Deprecations + +- `unusedALGoSystemFiles` will be removed after October 1st 2026. Please use [`customALGoFiles.filesToExclude`](https://aka.ms/algosettings#customALGoFiles) instead. + +## v8.0 + ### Mechanism to overwrite complex settings type By default, AL-Go merges settings from various places (see [settings levels](https://aka.ms/algosettings#where-are-the-settings-located)). Basic setting types such as `string` and `integer` are overwritten, but settings with complex types such as `array` and `object` are merged. @@ -20,6 +124,13 @@ Please note that some automated features are premium and require the use of [Git - Discussion 1885 Conditional settings for CI/CD are not applied - Discussion 1899 Remove optional properties from "required" list in settings.schema.json +- Issue 1905 AL-Go system files update fails (Get Workflow Multi-Run Branches action fails when there are tags with same value but different casing) +- Issue 1926 Deployment fails when using build modes +- Issue 1898 GetDependencies in localDevEnv does not fallback to github token +- Issue 1947 Project settings are ignored when loading bccontainerhelper +- Issue 1937 trackALAlertsInGitHub is failing in preview +- DeployTo settings from environment-specific AL-Go settings are not applied when deploying +- `ReadSettings` action outputs too much information that is mainly used for debugging ## v7.3 @@ -912,7 +1023,7 @@ Setting the repo setting "runs-on" to "Ubuntu-latest", followed by running Updat ### Issues - Issue #143 Commit Message for **Increment Version Number** workflow -- Issue #160 Create local DevEnv aith appDependencyProbingPaths +- Issue #160 Create local DevEnv with appDependencyProbingPaths - Issue #156 Versioningstrategy 2 doesn't use 24h format - Issue #155 Initial Add existing app fails with "Cannot find path" - Issue #152 Error when loading dependencies from releases diff --git a/.github/Test Current.settings.json b/.github/Test Current.settings.json index 5b8d889..5c99b9c 100644 --- a/.github/Test Current.settings.json +++ b/.github/Test Current.settings.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/settings.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json", "artifact": "////latest", "cacheImageName": "", "versioningStrategy": 15, diff --git a/.github/Test Next Major.settings.json b/.github/Test Next Major.settings.json index ce576a9..1f9c0f9 100644 --- a/.github/Test Next Major.settings.json +++ b/.github/Test Next Major.settings.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/settings.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json", "artifact": "////nextmajor/{INSIDERSASTOKEN}", "cacheImageName": "", "versioningStrategy": 15, diff --git a/.github/Test Next Minor.settings.json b/.github/Test Next Minor.settings.json index 8fbc0dc..35e9da2 100644 --- a/.github/Test Next Minor.settings.json +++ b/.github/Test Next Minor.settings.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/settings.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json", "artifact": "////nextminor/{INSIDERSASTOKEN}", "cacheImageName": "", "versioningStrategy": 15, diff --git a/.github/workflows/CICD.yaml b/.github/workflows/CICD.yaml index 874ee1d..58867fa 100644 --- a/.github/workflows/CICD.yaml +++ b/.github/workflows/CICD.yaml @@ -19,6 +19,7 @@ permissions: id-token: write pages: read security-events: write + packages: read env: workflowDepth: 2 @@ -47,41 +48,41 @@ jobs: baselineWorkflowSHA: ${{ steps.determineProjectsToBuild.outputs.BaselineWorkflowSHA }} workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} powerPlatformSolutionFolder: ${{ steps.DeterminePowerPlatformSolutionFolder.outputs.powerPlatformSolutionFolder }} - trackALAlertsInGithub: ${{ steps.SetALCodeAnalysisVar.outputs.trackALAlertsInGithub }} + trackALAlertsInGitHub: ${{ steps.SetALCodeAnalysisVar.outputs.trackALAlertsInGitHub }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - get: type,powerPlatformSolutionFolder,useGitSubmodules,trackALAlertsInGithub + get: type,powerPlatformSolutionFolder,useGitSubmodules,trackALAlertsInGitHub - name: Set AL Code Analysis Var output id: SetALCodeAnalysisVar run: | - Write-Host "trackALAlertsInGithub environment variable: '$($env:trackALAlertsInGithub)'" - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "trackALAlertsInGithub=$($env:trackALAlertsInGithub)" + Write-Host "trackALAlertsInGitHub environment variable: '$($env:trackALAlertsInGitHub)'" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "trackALAlertsInGitHub=$($env:trackALAlertsInGitHub)" - name: Read submodules token id: ReadSubmodulesToken if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -89,7 +90,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true submodules: ${{ env.useGitSubmodules }} @@ -102,7 +103,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -115,7 +116,7 @@ jobs: - name: Determine Delivery Target Secrets id: DetermineDeliveryTargetSecrets - uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh projectsJson: '${{ steps.determineProjectsToBuild.outputs.ProjectsJson }}' @@ -123,7 +124,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -131,7 +132,7 @@ jobs: - name: Determine Delivery Targets id: DetermineDeliveryTargets - uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineDeliveryTargets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -141,7 +142,7 @@ jobs: - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: @@ -154,24 +155,24 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh get: templateUrl - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: 'ghTokenWorkflow' - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go/Actions/CheckForUpdates@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/CheckForUpdates@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: @@ -232,31 +233,31 @@ jobs: CodeAnalysisUpload: needs: [ Initialization, Build ] - if: (!cancelled()) && (needs.Initialization.outputs.trackALAlertsInGithub == 'True') + if: (!cancelled()) && (needs.Initialization.outputs.trackALAlertsInGitHub == 'True') runs-on: [ ubuntu-latest ] name: Code Analysis Processing steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Download artifacts - ErrorLogs - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 if: (success() || failure()) with: - pattern: '*-ErrorLogs-*' + pattern: '*-*ErrorLogs-*' path: '${{ github.workspace }}/ErrorLogs/' - merge_multiple: true + merge-multiple: true - name: Process AL Code Analysis Logs id: ProcessALCodeAnalysisLogs if: (success() || failure()) - uses: microsoft/AL-Go/Actions/ProcessALCodeAnalysisLogs@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ProcessALCodeAnalysisLogs@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Upload SARIF file to GitHub - uses: github/codeql-action/upload-sarif@v3 - if: always() + uses: github/codeql-action/upload-sarif@v4 + if: (success() || failure()) && (hashFiles(format('{0}/ErrorLogs/output.sarif.json',github.workspace)) != '') with: sarif_file: '${{ github.workspace }}/ErrorLogs/output.sarif.json' category: "ALCodeAnalysis" @@ -276,15 +277,21 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Download artifacts - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a + with: + shell: pwsh + + - name: Determine ArtifactUrl + id: determineArtifactUrl + uses: microsoft/AL-Go/Actions/DetermineArtifactUrl@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh @@ -293,10 +300,11 @@ jobs: uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - name: Build Reference Documentation - uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh artifacts: '.artifacts' + artifactUrl: ${{ env.artifact }} - name: Upload pages artifact uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 @@ -325,15 +333,15 @@ jobs: ALGoEnvName: ${{ matrix.environment }} steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Download artifacts - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ matrix.shell }} get: type,powerPlatformSolutionFolder @@ -347,7 +355,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ matrix.shell }} gitHubSecrets: ${{ toJson(secrets) }} @@ -355,7 +363,7 @@ jobs: - name: Deploy to Business Central id: Deploy - uses: microsoft/AL-Go/Actions/Deploy@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/Deploy@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -367,7 +375,7 @@ jobs: - name: Deploy to Power Platform if: env.type == 'PTE' && env.powerPlatformSolutionFolder != '' - uses: microsoft/AL-Go/Actions/DeployPowerPlatform@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DeployPowerPlatform@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -387,28 +395,28 @@ jobs: name: Deliver to ${{ matrix.deliveryTarget }} steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Download artifacts - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: path: '.artifacts' - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ matrix.deliveryTarget }}Context' - name: Deliver - uses: microsoft/AL-Go/Actions/Deliver@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/Deliver@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -424,11 +432,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml index 18eec3e..001c570 100644 --- a/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml +++ b/.github/workflows/CreateOnlineDevelopmentEnvironment.yaml @@ -50,28 +50,28 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -90,7 +90,7 @@ jobs: Write-Host "AdminCenterApiCredentials not provided, initiating Device Code flow" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -109,16 +109,16 @@ jobs: deviceCode: ${{ needs.Initialization.outputs.deviceCode }} steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -137,7 +137,7 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -value "adminCenterApiCredentials=$adminCenterApiCredentials" - name: Create Development Environment - uses: microsoft/AL-Go/Actions/CreateDevelopmentEnvironment@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/CreateDevelopmentEnvironment@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -149,7 +149,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/CreateRelease.yaml b/.github/workflows/CreateRelease.yaml index 2a51175..32e405e 100644 --- a/.github/workflows/CreateRelease.yaml +++ b/.github/workflows/CreateRelease.yaml @@ -78,35 +78,35 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh get: templateUrl,repoName,type,powerPlatformSolutionFolder - name: Validate Workflow Input if: ${{ github.event_name == 'workflow_dispatch' }} - uses: microsoft/AL-Go/Actions/ValidateWorkflowInput@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ValidateWorkflowInput@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -115,12 +115,12 @@ jobs: - name: Determine Projects id: determineProjects - uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Check for updates to AL-Go system files - uses: microsoft/AL-Go/Actions/CheckForUpdates@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/CheckForUpdates@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: @@ -130,7 +130,7 @@ jobs: downloadLatest: true - name: Determine artifacts for release - uses: microsoft/AL-Go/Actions/DetermineArtifactsForRelease@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineArtifactsForRelease@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a id: determineArtifactsForRelease with: shell: pwsh @@ -141,7 +141,7 @@ jobs: - name: Prepare release notes id: createreleasenotes - uses: microsoft/AL-Go/Actions/CreateReleaseNotes@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/CreateReleaseNotes@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh buildVersion: ${{ github.event.inputs.buildVersion }} @@ -187,16 +187,16 @@ jobs: fail-fast: true steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -240,7 +240,7 @@ jobs: }); - name: Deliver to NuGet - uses: microsoft/AL-Go/Actions/Deliver@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/Deliver@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).nuGetContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -253,7 +253,7 @@ jobs: atypes: 'Apps,TestApps' - name: Deliver to Storage - uses: microsoft/AL-Go/Actions/Deliver@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/Deliver@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a if: ${{ fromJson(steps.ReadSecrets.outputs.Secrets).storageContext != '' }} env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -271,7 +271,7 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: '${{ needs.createRelease.outputs.commitish }}' @@ -294,16 +294,16 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -311,7 +311,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Update Version Number - uses: microsoft/AL-Go/Actions/IncrementVersionNumber@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/IncrementVersionNumber@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -325,11 +325,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/Current.yaml b/.github/workflows/Current.yaml index da7a1d9..d54ac8e 100644 --- a/.github/workflows/Current.yaml +++ b/.github/workflows/Current.yaml @@ -9,6 +9,7 @@ permissions: actions: read contents: read id-token: write + packages: read defaults: run: @@ -32,24 +33,24 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh get: useGitSubmodules,shortLivedArtifactsRetentionDays @@ -57,7 +58,7 @@ jobs: - name: Read submodules token id: ReadSubmodulesToken if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -65,7 +66,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true submodules: ${{ env.useGitSubmodules }} @@ -79,7 +80,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -134,11 +135,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/DeployReferenceDocumentation.yaml b/.github/workflows/DeployReferenceDocumentation.yaml index 2df318d..b3927d5 100644 --- a/.github/workflows/DeployReferenceDocumentation.yaml +++ b/.github/workflows/DeployReferenceDocumentation.yaml @@ -26,22 +26,28 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a + with: + shell: pwsh + + - name: Determine ArtifactUrl + id: determineArtifactUrl + uses: microsoft/AL-Go/Actions/DetermineArtifactUrl@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: @@ -54,10 +60,11 @@ jobs: uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 - name: Build Reference Documentation - uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/BuildReferenceDocumentation@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh artifacts: 'latest' + artifactUrl: ${{ env.artifact }} - name: Upload pages artifact uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 @@ -71,7 +78,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/IncrementVersionNumber.yaml b/.github/workflows/IncrementVersionNumber.yaml index faeb33f..e7b54d2 100644 --- a/.github/workflows/IncrementVersionNumber.yaml +++ b/.github/workflows/IncrementVersionNumber.yaml @@ -48,33 +48,33 @@ jobs: pull-requests: write steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Validate Workflow Input if: ${{ github.event_name == 'workflow_dispatch' }} - uses: microsoft/AL-Go/Actions/ValidateWorkflowInput@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ValidateWorkflowInput@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -82,7 +82,7 @@ jobs: useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}' - name: Increment Version Number - uses: microsoft/AL-Go/Actions/IncrementVersionNumber@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/IncrementVersionNumber@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh token: ${{ steps.ReadSecrets.outputs.TokenForPush }} @@ -93,7 +93,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/NextMajor.yaml b/.github/workflows/NextMajor.yaml index 92ca443..7333654 100644 --- a/.github/workflows/NextMajor.yaml +++ b/.github/workflows/NextMajor.yaml @@ -9,6 +9,7 @@ permissions: actions: read contents: read id-token: write + packages: read defaults: run: @@ -32,24 +33,24 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh get: useGitSubmodules,shortLivedArtifactsRetentionDays @@ -57,7 +58,7 @@ jobs: - name: Read submodules token id: ReadSubmodulesToken if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -65,7 +66,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true submodules: ${{ env.useGitSubmodules }} @@ -79,7 +80,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -134,11 +135,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/NextMinor.yaml b/.github/workflows/NextMinor.yaml index 2d2753b..e145cde 100644 --- a/.github/workflows/NextMinor.yaml +++ b/.github/workflows/NextMinor.yaml @@ -9,6 +9,7 @@ permissions: actions: read contents: read id-token: write + packages: read defaults: run: @@ -32,24 +33,24 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh get: useGitSubmodules,shortLivedArtifactsRetentionDays @@ -57,7 +58,7 @@ jobs: - name: Read submodules token id: ReadSubmodulesToken if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -65,7 +66,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true submodules: ${{ env.useGitSubmodules }} @@ -79,7 +80,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -134,11 +135,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PublishToAppSource.yaml b/.github/workflows/PublishToAppSource.yaml index 0956c29..8344cfa 100644 --- a/.github/workflows/PublishToAppSource.yaml +++ b/.github/workflows/PublishToAppSource.yaml @@ -38,16 +38,16 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh @@ -57,23 +57,23 @@ jobs: name: Deliver to AppSource steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} getSecrets: 'appSourceContext' - name: Deliver - uses: microsoft/AL-Go/Actions/Deliver@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/Deliver@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -90,11 +90,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PublishToEnvironment.yaml b/.github/workflows/PublishToEnvironment.yaml index 952451e..12eae69 100644 --- a/.github/workflows/PublishToEnvironment.yaml +++ b/.github/workflows/PublishToEnvironment.yaml @@ -10,6 +10,10 @@ on: environmentName: description: Environment mask to receive the new version (* for all, PROD* for all environments starting with PROD) required: true + createEnvIfNotExists: + description: Create environment if it does not exist (use with care, yourEnvName_AuthContext yourEnvName_EnvironmentName yourEnvName_Scope must be defined as environment secrets/variables or repo secrets/variables) + type: boolean + default: false permissions: actions: read @@ -38,34 +42,35 @@ jobs: telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Determine Deployment Environments id: DetermineDeploymentEnvironments - uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineDeploymentEnvironments@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: shell: pwsh getEnvironments: ${{ github.event.inputs.environmentName }} type: 'Publish' + createEnvIfNotExists: ${{ github.event.inputs.createEnvIfNotExists }} - name: EnvName id: envName @@ -77,7 +82,7 @@ jobs: - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a if: steps.DetermineDeploymentEnvironments.outputs.UnknownEnvironment == 1 with: shell: pwsh @@ -109,7 +114,7 @@ jobs: Write-Host "No AuthContext provided for $envName, initiating Device Code flow" $ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1" $webClient = New-Object System.Net.WebClient - $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) + $webClient.DownloadFile('https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/AL-Go-Helper.ps1', $ALGoHelperPath) . $ALGoHelperPath DownloadAndImportBcContainerHelper $authContext = New-BcAuthContext -includeDeviceLogin -deviceLoginTimeout ([TimeSpan]::FromSeconds(0)) @@ -135,7 +140,7 @@ jobs: ALGoEnvName: ${{ matrix.environment }} steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: EnvName id: envName @@ -145,21 +150,21 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "envName=$envName" - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ matrix.shell }} get: type,powerPlatformSolutionFolder - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ matrix.shell }} gitHubSecrets: ${{ toJson(secrets) }} getSecrets: '${{ steps.envName.outputs.envName }}-AuthContext,${{ steps.envName.outputs.envName }}_AuthContext,AuthContext' - name: Get Artifacts for deployment - uses: microsoft/AL-Go/Actions/GetArtifactsForDeployment@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/GetArtifactsForDeployment@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ matrix.shell }} artifactsVersion: ${{ github.event.inputs.appVersion }} @@ -167,7 +172,7 @@ jobs: - name: Deploy to Business Central id: Deploy - uses: microsoft/AL-Go/Actions/Deploy@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/Deploy@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -180,7 +185,7 @@ jobs: - name: Deploy to Power Platform if: env.type == 'PTE' && env.powerPlatformSolutionFolder != '' - uses: microsoft/AL-Go/Actions/DeployPowerPlatform@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DeployPowerPlatform@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -195,11 +200,11 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/PullRequestHandler.yaml b/.github/workflows/PullRequestHandler.yaml index d8141b6..707bb6e 100644 --- a/.github/workflows/PullRequestHandler.yaml +++ b/.github/workflows/PullRequestHandler.yaml @@ -3,9 +3,10 @@ name: 'Pull Request Build' on: pull_request_target: branches: [ 'main' ] + merge_group: concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + group: ${{ github.workflow }}-${{ github.event_name == 'merge_group' && github.run_id || github.event.pull_request.number }} cancel-in-progress: true defaults: @@ -18,6 +19,7 @@ permissions: id-token: write pull-requests: read security-events: write + packages: read env: workflowDepth: 2 @@ -29,7 +31,7 @@ jobs: if: (github.event.pull_request.base.repo.full_name != github.event.pull_request.head.repo.full_name) && (github.event_name != 'pull_request') runs-on: windows-latest steps: - - uses: microsoft/AL-Go/Actions/VerifyPRChanges@55f06533726d052e7603277236f2bcbcd67fa6cf + - uses: microsoft/AL-Go/Actions/VerifyPRChanges@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a Initialization: needs: [ PregateCheck ] @@ -44,37 +46,37 @@ jobs: workflowDepth: ${{ steps.DetermineWorkflowDepth.outputs.WorkflowDepth }} artifactsRetentionDays: ${{ steps.DetermineWorkflowDepth.outputs.ArtifactsRetentionDays }} telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }} - trackALAlertsInGithub: ${{ steps.SetALCodeAnalysisVar.outputs.trackALAlertsInGithub }} + trackALAlertsInGitHub: ${{ steps.SetALCodeAnalysisVar.outputs.trackALAlertsInGitHub }} steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true - ref: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} + ref: ${{ github.event_name == 'pull_request' && github.sha || github.event_name == 'merge_group' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - get: shortLivedArtifactsRetentionDays,trackALAlertsInGithub + get: shortLivedArtifactsRetentionDays,trackALAlertsInGitHub - name: Set AL Code Analysis Var output id: SetALCodeAnalysisVar run: | - Write-Host "trackALAlertsInGithub environment variable: '$($env:trackALAlertsInGithub)'" - Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "trackALAlertsInGithub=$($env:trackALAlertsInGithub)" + Write-Host "trackALAlertsInGitHub environment variable: '$($env:trackALAlertsInGitHub)'" + Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "trackALAlertsInGitHub=$($env:trackALAlertsInGitHub)" - name: Determine Workflow Depth id: DetermineWorkflowDepth @@ -84,7 +86,7 @@ jobs: - name: Determine Projects To Build id: determineProjectsToBuild - uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineProjectsToBuild@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh maxBuildDepth: ${{ env.workflowDepth }} @@ -102,7 +104,7 @@ jobs: with: shell: ${{ matrix.githubRunnerShell }} runsOn: ${{ matrix.githubRunner }} - checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} + checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || github.event_name == 'merge_group' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} @@ -128,7 +130,7 @@ jobs: with: shell: ${{ matrix.githubRunnerShell }} runsOn: ${{ matrix.githubRunner }} - checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || format('refs/pull/{0}/merge', github.event.pull_request.number) }} + checkoutRef: ${{ github.event_name == 'pull_request' && github.sha || github.event_name == 'merge_group' && github.ref || format('refs/pull/{0}/merge', github.event.pull_request.number) }} project: ${{ matrix.project }} projectName: ${{ matrix.projectName }} buildMode: ${{ matrix.buildMode }} @@ -143,33 +145,33 @@ jobs: CodeAnalysisUpload: needs: [ Initialization, Build ] - if: (!cancelled()) && (needs.Initialization.outputs.trackALAlertsInGithub == 'True') + if: (!cancelled()) && (needs.Initialization.outputs.trackALAlertsInGitHub == 'True') && (github.event_name != 'merge_group') runs-on: [ ubuntu-latest ] name: Code Analysis Processing steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ format('refs/pull/{0}/head', github.event.pull_request.number) }} - name: Download artifacts - ErrorLogs - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 if: (success() || failure()) with: - pattern: '*-ErrorLogs-*' + pattern: '*-*ErrorLogs-*' path: '${{ github.workspace }}/ErrorLogs/' - merge_multiple: true + merge-multiple: true - name: Process AL Code Analysis Logs id: ProcessALCodeAnalysisLogs if: (success() || failure()) - uses: microsoft/AL-Go/Actions/ProcessALCodeAnalysisLogs@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ProcessALCodeAnalysisLogs@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Upload SARIF file to GitHub - uses: github/codeql-action/upload-sarif@v3 - if: always() + uses: github/codeql-action/upload-sarif@v4 + if: (success() || failure()) && (hashFiles(format('{0}/ErrorLogs/output.sarif.json',github.workspace)) != '') with: sarif_file: '${{ github.workspace }}/ErrorLogs/output.sarif.json' category: "ALCodeAnalysis" @@ -184,7 +186,7 @@ jobs: steps: - name: Pull Request Status Check id: PullRequestStatusCheck - uses: microsoft/AL-Go/Actions/PullRequestStatusCheck@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/PullRequestStatusCheck@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: @@ -192,7 +194,7 @@ jobs: - name: Finalize the workflow id: PostProcess - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a if: success() || failure() env: GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/Troubleshooting.yaml b/.github/workflows/Troubleshooting.yaml index a27b35d..8cf5000 100644 --- a/.github/workflows/Troubleshooting.yaml +++ b/.github/workflows/Troubleshooting.yaml @@ -25,12 +25,12 @@ jobs: runs-on: [ ubuntu-latest ] steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: lfs: true - name: Troubleshooting - uses: microsoft/AL-Go/Actions/Troubleshooting@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/Troubleshooting@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} diff --git a/.github/workflows/UpdateGitHubGoSystemFiles.yaml b/.github/workflows/UpdateGitHubGoSystemFiles.yaml index 13dc59e..27d092e 100644 --- a/.github/workflows/UpdateGitHubGoSystemFiles.yaml +++ b/.github/workflows/UpdateGitHubGoSystemFiles.yaml @@ -19,6 +19,26 @@ on: description: Specify a comma-separated list of branches to update. Wildcards are supported. The AL-Go settings will be read for every branch. Leave empty to update the current branch only. required: false default: '' + workflow_call: + inputs: + templateUrl: + description: Template Repository URL (current is https://github.com/microsoft/AL-Go-AppSource@preview) + type: string + required: false + default: '' + downloadLatest: + description: Download latest from template repository + type: boolean + default: true + directCommit: + description: Direct Commit? + type: boolean + default: false + includeBranches: + description: Specify a comma-separated list of branches to update. Wildcards are supported. The AL-Go settings will be read for every branch. Leave empty to update the current branch only. + type: string + required: false + default: '' permissions: actions: read @@ -42,18 +62,18 @@ jobs: TemplateUrl: ${{ steps.DetermineTemplateUrl.outputs.TemplateUrl }} steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Read settings id: ReadSettings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh get: templateUrl - name: Get Workflow Multi-Run Branches id: GetBranches - uses: microsoft/AL-Go/Actions/GetWorkflowMultiRunBranches@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/GetWorkflowMultiRunBranches@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh includeBranches: ${{ github.event.inputs.includeBranches }} @@ -82,30 +102,30 @@ jobs: steps: - name: Dump Workflow Information - uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DumpWorkflowInfo@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ matrix.branch }} - name: Initialize the workflow id: init - uses: microsoft/AL-Go/Actions/WorkflowInitialize@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowInitialize@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh get: commitOptions - name: Read secrets id: ReadSecrets - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: pwsh gitHubSecrets: ${{ toJson(secrets) }} @@ -117,8 +137,8 @@ jobs: downloadLatest: '${{ github.event.inputs.downloadLatest }}' run: | $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 - if('${{ github.event_name }}' -eq 'workflow_dispatch') { - Write-Host "Using inputs from workflow_dispatch event" + if('${{ github.event_name }}' -in 'workflow_dispatch', 'workflow_call') { + Write-Host "Using inputs from ${{ github.event_name }} event" $directCommit = $env:directCommit $downloadLatest = $env:downloadLatest } @@ -132,7 +152,7 @@ jobs: Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "downloadLatest=$downloadLatest" - name: Update AL-Go system files - uses: microsoft/AL-Go/Actions/CheckForUpdates@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/CheckForUpdates@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: @@ -146,7 +166,7 @@ jobs: - name: Finalize the workflow if: always() - uses: microsoft/AL-Go/Actions/WorkflowPostProcess@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/WorkflowPostProcess@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: GITHUB_TOKEN: ${{ github.token }} with: diff --git a/.github/workflows/_BuildALGoProject.yaml b/.github/workflows/_BuildALGoProject.yaml index a3559a5..db92fda 100644 --- a/.github/workflows/_BuildALGoProject.yaml +++ b/.github/workflows/_BuildALGoProject.yaml @@ -82,6 +82,7 @@ permissions: actions: read contents: read id-token: write + packages: read env: ALGoOrgSettings: ${{ vars.ALGoOrgSettings }} @@ -97,22 +98,22 @@ jobs: name: ${{ inputs.projectName }} (${{ inputs.buildMode }}) steps: - name: Checkout - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ inputs.checkoutRef }} lfs: true - name: Read settings - uses: microsoft/AL-Go/Actions/ReadSettings@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSettings@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} buildMode: ${{ inputs.buildMode }} - get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,doNotRunTests,doNotRunBcptTests,doNotRunpageScriptingTests,artifact,generateDependencyArtifact,trustedSigning,useGitSubmodules,trackALAlertsInGithub + get: useCompilerFolder,keyVaultCodesignCertificateName,doNotSignApps,doNotRunTests,doNotRunBcptTests,doNotRunpageScriptingTests,artifact,generateDependencyArtifact,trustedSigning,useGitSubmodules,trackALAlertsInGitHub - name: Determine whether to build project id: DetermineBuildProject - uses: microsoft/AL-Go/Actions/DetermineBuildProject@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineBuildProject@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ inputs.shell }} skippedProjectsJson: ${{ inputs.skippedProjectsJson }} @@ -122,7 +123,7 @@ jobs: - name: Read secrets id: ReadSecrets if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && github.event_name != 'pull_request' - uses: microsoft/AL-Go/Actions/ReadSecrets@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/ReadSecrets@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ inputs.shell }} gitHubSecrets: ${{ toJson(secrets) }} @@ -130,7 +131,7 @@ jobs: - name: Checkout Submodules if: env.useGitSubmodules != 'false' && env.useGitSubmodules != '' - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: ref: ${{ inputs.checkoutRef }} lfs: true @@ -140,14 +141,14 @@ jobs: - name: Determine ArtifactUrl id: determineArtifactUrl if: steps.DetermineBuildProject.outputs.BuildIt == 'True' - uses: microsoft/AL-Go/Actions/DetermineArtifactUrl@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DetermineArtifactUrl@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} - name: Cache Business Central Artifacts if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && env.useCompilerFolder == 'True' && inputs.useArtifactCache && env.artifactCacheKey - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 + uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2 with: path: ${{ runner.temp }}/.artifactcache key: ${{ env.artifactCacheKey }} @@ -155,7 +156,7 @@ jobs: - name: Download Project Dependencies id: DownloadProjectDependencies if: steps.DetermineBuildProject.outputs.BuildIt == 'True' - uses: microsoft/AL-Go/Actions/DownloadProjectDependencies@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/DownloadProjectDependencies@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' with: @@ -166,7 +167,7 @@ jobs: baselineWorkflowRunId: ${{ inputs.baselineWorkflowRunId }} - name: Build - uses: microsoft/AL-Go/Actions/RunPipeline@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/RunPipeline@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a if: steps.DetermineBuildProject.outputs.BuildIt == 'True' env: Secrets: '${{ steps.ReadSecrets.outputs.Secrets }}' @@ -184,8 +185,8 @@ jobs: - name: Sign id: sign - if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && inputs.signArtifacts && env.doNotSignApps == 'False' && (env.keyVaultCodesignCertificateName != '' || (fromJson(env.trustedSigning).Endpoint != '' && fromJson(env.trustedSigning).Account != '' && fromJson(env.trustedSigning).CertificateProfile != '')) - uses: microsoft/AL-Go/Actions/Sign@55f06533726d052e7603277236f2bcbcd67fa6cf + if: steps.DetermineBuildProject.outputs.BuildIt == 'True' && inputs.signArtifacts && env.doNotSignApps == 'False' && (env.keyVaultCodesignCertificateName != '' || (fromJson(env.trustedSigning).Endpoint != '' && fromJson(env.trustedSigning).Account != '' && fromJson(env.trustedSigning).CertificateProfile != '')) && (hashFiles(format('{0}/.buildartifacts/Apps/*.app',inputs.project)) != '') + uses: microsoft/AL-Go/Actions/Sign@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ inputs.shell }} azureCredentialsJson: '${{ fromJson(steps.ReadSecrets.outputs.Secrets).AZURE_CREDENTIALS }}' @@ -193,7 +194,7 @@ jobs: - name: Calculate Artifact names id: calculateArtifactsNames - uses: microsoft/AL-Go/Actions/CalculateArtifactNames@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/CalculateArtifactNames@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a if: success() || failure() with: shell: ${{ inputs.shell }} @@ -202,7 +203,7 @@ jobs: suffix: ${{ inputs.artifactsNameSuffix }} - name: Publish artifacts - apps - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: inputs.artifactsRetentionDays >= 0 && (hashFiles(format('{0}/.buildartifacts/Apps/*',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.AppsArtifactsName }} @@ -211,7 +212,7 @@ jobs: retention-days: ${{ inputs.artifactsRetentionDays }} - name: Publish artifacts - dependencies - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: inputs.artifactsRetentionDays >= 0 && env.generateDependencyArtifact == 'True' && (hashFiles(format('{0}/.buildartifacts/Dependencies/*',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.DependenciesArtifactsName }} @@ -220,7 +221,7 @@ jobs: retention-days: ${{ inputs.artifactsRetentionDays }} - name: Publish artifacts - test apps - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: inputs.artifactsRetentionDays >= 0 && (hashFiles(format('{0}/.buildartifacts/TestApps/*',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.TestAppsArtifactsName }} @@ -229,7 +230,7 @@ jobs: retention-days: ${{ inputs.artifactsRetentionDays }} - name: Publish artifacts - build output - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: (success() || failure()) && (hashFiles(format('{0}/BuildOutput.txt',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.BuildOutputArtifactsName }} @@ -237,7 +238,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - container event log - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: (failure()) && (hashFiles(format('{0}/ContainerEventLog.evtx',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.ContainerEventLogArtifactsName }} @@ -245,7 +246,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - test results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/TestResults.xml',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.TestResultsArtifactsName }} @@ -253,7 +254,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - bcpt test results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/bcptTestResults.json',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.BcptTestResultsArtifactsName }} @@ -261,7 +262,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - page scripting test results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/PageScriptingTestResults.xml',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.PageScriptingTestResultsArtifactsName }} @@ -269,7 +270,7 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - page scripting test result details - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 if: (success() || failure()) && (hashFiles(format('{0}/.buildartifacts/PageScriptingTestResultDetails/*',inputs.project)) != '') with: name: ${{ steps.calculateArtifactsNames.outputs.PageScriptingTestResultDetailsArtifactsName }} @@ -277,8 +278,8 @@ jobs: if-no-files-found: ignore - name: Publish artifacts - ErrorLogs - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: inputs.artifactsRetentionDays >= 0 && (hashFiles(format('{0}/.buildartifacts/ErrorLogs/*',inputs.project)) != '') && env.trackALAlertsInGithub == 'True' + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + if: (success() || failure()) && inputs.artifactsRetentionDays >= 0 && (hashFiles(format('{0}/.buildartifacts/ErrorLogs/*',inputs.project)) != '') && env.trackALAlertsInGitHub == 'True' with: name: ${{ steps.calculateArtifactsNames.outputs.ErrorLogsArtifactsName }} path: '${{ inputs.project }}/.buildartifacts/ErrorLogs/' @@ -288,7 +289,7 @@ jobs: - name: Analyze Test Results id: analyzeTestResults if: (success() || failure()) && env.doNotRunTests == 'False' - uses: microsoft/AL-Go/Actions/AnalyzeTests@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/AnalyzeTests@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} @@ -297,7 +298,7 @@ jobs: - name: Analyze BCPT Test Results id: analyzeTestResultsBCPT if: (success() || failure()) && env.doNotRunBcptTests == 'False' - uses: microsoft/AL-Go/Actions/AnalyzeTests@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/AnalyzeTests@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} @@ -306,7 +307,7 @@ jobs: - name: Analyze Page Scripting Test Results id: analyzeTestResultsPageScripting if: (success() || failure()) && env.doNotRunpageScriptingTests == 'False' - uses: microsoft/AL-Go/Actions/AnalyzeTests@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/AnalyzeTests@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} @@ -314,7 +315,7 @@ jobs: - name: Cleanup if: always() && steps.DetermineBuildProject.outputs.BuildIt == 'True' - uses: microsoft/AL-Go/Actions/PipelineCleanup@55f06533726d052e7603277236f2bcbcd67fa6cf + uses: microsoft/AL-Go/Actions/PipelineCleanup@924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a with: shell: ${{ inputs.shell }} project: ${{ inputs.project }} diff --git a/Library Apps/.AL-Go/cloudDevEnv.ps1 b/Library Apps/.AL-Go/cloudDevEnv.ps1 index 8a38e39..95fb0f5 100644 --- a/Library Apps/.AL-Go/cloudDevEnv.ps1 +++ b/Library Apps/.AL-Go/cloudDevEnv.ps1 @@ -1,13 +1,103 @@ -# -# Script for creating cloud development environment -# Please do not modify this script as it will be auto-updated from the AL-Go Template -# Recommended approach is to use as is or add a script (freddyk-devenv.ps1), which calls this script with the user specific parameters -# +<# +.SYNOPSIS + Creates a cloud-based development environment for Business Central AL development using SaaS Sandbox. + +.DESCRIPTION + This script sets up a cloud-based development environment by: + - Creating a Business Central SaaS Sandbox environment + - Compiling and publishing all apps and test apps to the development scope + - Configuring launch.json for Visual Studio Code with Cloud Sandbox configuration + - Optionally applying custom settings to override repository settings + + The script will prompt you interactively for authentication using device code flow. + For automated/unattended execution, you can configure AdminCenterApiCredentials as a GitHub secret + or in Azure KeyVault. See https://aka.ms/algosettings for more information about AdminCenterApiCredentials. + + This is an alternative to localDevEnv.ps1 for users who cannot run Docker containers locally. + + RECOMMENDED USAGE: + Instead of modifying this script directly (which will be overwritten during AL-Go updates), + create a custom script that calls this one with your preferred parameters. For example, + create a file named after yourself (e.g., 'john-devenv.ps1') that contains: + + # My personal cloud development environment script + $mySettings = '{"country":"us"}' + . .\.AL-Go\cloudDevEnv.ps1 -environmentName "john-sandbox" -reuseExistingEnvironment $true -customSettings $mySettings + + This approach allows you to: + - Maintain your personal preferences without losing them during updates + - Share your setup with team members + - Version control your custom development configurations + - Easily switch between different development scenarios + +.PARAMETER environmentName + The name of the cloud sandbox environment to create or reuse. + If not specified, the script will prompt for input with a default of "{username}-sandbox". + +.PARAMETER reuseExistingEnvironment + Boolean parameter indicating whether to reuse an existing environment with the same name. + If $true, the script will use the existing environment if it exists. + If $false, the script will recreate the environment (deleting the old one if it exists). + If not specified, the script will prompt the user to select the behavior. + +.PARAMETER fromVSCode + Switch parameter indicating the script is being run from Visual Studio Code. + When specified, the script will pause at the end waiting for user input before closing. + +.PARAMETER clean + Switch parameter to create a clean development environment without compiling and publishing apps. + Useful for setting up a fresh environment without deploying any applications. + +.PARAMETER customSettings + JSON string containing custom settings that override repository settings. + These settings have the highest precedence and can be used to override country, + or other configuration without modifying repository files. + +.EXAMPLE + .\cloudDevEnv.ps1 + Runs the script interactively, prompting for all required parameters. + +.EXAMPLE + .\cloudDevEnv.ps1 -environmentName "my-sandbox" -reuseExistingEnvironment $true + Creates or reuses a cloud sandbox named "my-sandbox". + +.EXAMPLE + .\cloudDevEnv.ps1 -clean + Creates a clean cloud development environment without compiling and publishing apps. + +.EXAMPLE + .\cloudDevEnv.ps1 -customSettings '{"country":"dk"}' + Creates a cloud development environment with custom settings for Denmark country. + +.EXAMPLE + # Programmatic setup with custom settings + $envName = "test-sandbox" + $settings = '{"country": "us"}' + + . ./cloudDevEnv.ps1 -environmentName $envName -reuseExistingEnvironment $true -customSettings $settings + + Creates or reuses a cloud development environment with custom country setting. + +.NOTES + - Authentication is handled interactively via device code flow (https://aka.ms/devicelogin) + - For unattended execution, configure AdminCenterApiCredentials secret (see link below) + - Does not require Docker to be installed + - Script automatically downloads required AL-Go helper modules and actions + - Modifies launch.json in VS Code workspace for Cloud Sandbox configuration + - Custom settings parameter allows runtime override of repository settings + - If NewBcContainer.ps1 override exists, cloud development may not be supported + +.LINK + https://aka.ms/algosettings - AL-Go Settings Documentation + https://github.com/microsoft/AL-Go/blob/main/Scenarios/CreateOnlineDevEnv2.md - Online Dev Environment Setup +#> + Param( [string] $environmentName = "", [bool] $reuseExistingEnvironment, [switch] $fromVSCode, - [switch] $clean + [switch] $clean, + [string] $customSettings = "" ) $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 @@ -51,12 +141,12 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt -$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder -$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt +$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder +$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath Import-Module $ReadSettingsModule @@ -103,7 +193,8 @@ CreateDevEnv ` -reuseExistingEnvironment:$reuseExistingEnvironment ` -baseFolder $baseFolder ` -project $project ` - -clean:$clean + -clean:$clean ` + -customSettings $customSettings } catch { Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)" diff --git a/Library Apps/.AL-Go/localDevEnv.ps1 b/Library Apps/.AL-Go/localDevEnv.ps1 index 234bb23..4bd45e1 100644 --- a/Library Apps/.AL-Go/localDevEnv.ps1 +++ b/Library Apps/.AL-Go/localDevEnv.ps1 @@ -1,8 +1,106 @@ -# -# Script for creating local development environment -# Please do not modify this script as it will be auto-updated from the AL-Go Template -# Recommended approach is to use as is or add a script (freddyk-devenv.ps1), which calls this script with the user specific parameters -# +<# +.SYNOPSIS + Creates a local development environment for Business Central AL development using Docker containers. + +.DESCRIPTION + This script sets up a local development environment by: + - Creating a Business Central container using Docker + - Compiling and publishing all apps and test apps to the development scope + - Configuring launch.json for Visual Studio Code with Local Sandbox configuration + - Optionally applying custom settings to override repository settings + + The script requires Docker to be installed and configured to run Windows containers. + If Docker setup fails, users can alternatively run cloudDevEnv.ps1 for cloud-based development. + + RECOMMENDED USAGE: + Instead of modifying this script directly (which will be overwritten during AL-Go updates), + create a custom script that calls this one with your preferred parameters. For example, + create a file named after yourself (e.g., 'john-devenv.ps1') that contains: + + # My personal development environment script + $mySettings = '{"country":"us","artifact":"////nextminor"}' + . .\.AL-Go\localDevEnv.ps1 -containerName "mydevenv" -auth UserPassword -customSettings $mySettings + + This approach allows you to: + - Maintain your personal preferences without losing them during updates + - Share your setup with team members + - Version control your custom development configurations + - Easily switch between different development scenarios + +.PARAMETER containerName + The name of the Docker container to create. If not specified, the script will prompt for input. + Default prompts for "bcserver" if not provided. + +.PARAMETER auth + Authentication mechanism for the container. Valid values are "UserPassword" or "Windows". + If not specified, the script will prompt the user to select the authentication method. + +.PARAMETER credential + PSCredential object containing username and password for container authentication. + If not provided, the script will prompt for credentials based on the selected auth method. + +.PARAMETER licenseFileUrl + Local path or secure download URL to a Business Central license file. + For AppSource apps targeting BC versions prior to 22, a developer license with object ID permissions is required. + For PTEs, this is optional but can be useful for dependent app object IDs. + Set to "none" to skip license file input. + +.PARAMETER fromVSCode + Switch parameter indicating the script is being run from Visual Studio Code. + When specified, the script will pause at the end waiting for user input before closing. + +.PARAMETER accept_insiderEula + Switch parameter to automatically accept the insider EULA when using Business Central insider builds. + Required when working with insider artifacts. + +.PARAMETER clean + Switch parameter to create a clean development environment without compiling and publishing apps. + Useful for setting up a fresh container without deploying any applications. + +.PARAMETER customSettings + JSON string containing custom settings that override repository settings. + These settings have the highest precedence and can be used to override artifact URLs, + country settings, or other configuration without modifying repository files. + +.EXAMPLE + .\localDevEnv.ps1 + Runs the script interactively, prompting for all required parameters. + +.EXAMPLE + .\localDevEnv.ps1 -containerName "mydevenv" -auth "UserPassword" + Creates a container named "mydevenv" with username/password authentication, prompting for credentials and LicenseFile. + +.EXAMPLE + .\localDevEnv.ps1 -clean + Creates a clean development environment without compiling and publishing apps. + +.EXAMPLE + .\localDevEnv.ps1 -customSettings '{"country":"dk","artifact":"////nextminor"}' + Creates a development environment with custom settings for Denmark country and specific artifact. + +.EXAMPLE + # Programmatic setup with credentials and custom settings + $Username = "SUPER" + $Password = "" + $cred = New-Object System.Management.Automation.PSCredential ($Username, (ConvertTo-SecureString $Password -AsPlainText -Force)) + $containerName = "bcserver" + $settings = '{"artifact": "////nextminor"}' + + . ./localDevEnv.ps1 -containerName $containerName -auth UserPassword -credential $cred -accept_insiderEula -licenseFileUrl "none" -customSettings $settings + + Creates a development environment with predefined credentials, using next minor version artifact, accepting insider EULA, and no license file. + +.NOTES + - Requires Docker Desktop to be installed and running with Windows container support + - For AppSource apps, may require a developer license for BC versions prior to 22 + - Script automatically downloads required AL-Go helper modules and actions + - Modifies launch.json in VS Code workspace for Local Sandbox configuration + - Custom settings parameter allows runtime override of repository settings + +.LINK + https://aka.ms/algosettings - AL-Go Settings Documentation +#> + Param( [string] $containerName = "", [ValidateSet("UserPassword", "Windows")] @@ -11,7 +109,8 @@ Param( [string] $licenseFileUrl = "", [switch] $fromVSCode, [switch] $accept_insiderEula, - [switch] $clean + [switch] $clean, + [string] $customSettings = "" ) $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 @@ -55,12 +154,12 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt -$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder -$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt +$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder +$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath Import-Module $ReadSettingsModule @@ -160,7 +259,8 @@ CreateDevEnv ` -credential $credential ` -licenseFileUrl $licenseFileUrl ` -accept_insiderEula:$accept_insiderEula ` - -clean:$clean + -clean:$clean ` + -customSettings $customSettings } catch { Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)" diff --git a/Library Apps/.AL-Go/settings.json b/Library Apps/.AL-Go/settings.json index 29a3875..ed868b2 100644 --- a/Library Apps/.AL-Go/settings.json +++ b/Library Apps/.AL-Go/settings.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/settings.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json", "country": "us", "VersioningStrategy": 16, "CodeSignCertificateUrlSecretName": "CodeSignCertificateUrl", diff --git a/Main App/.AL-Go/cloudDevEnv.ps1 b/Main App/.AL-Go/cloudDevEnv.ps1 index 8a38e39..95fb0f5 100644 --- a/Main App/.AL-Go/cloudDevEnv.ps1 +++ b/Main App/.AL-Go/cloudDevEnv.ps1 @@ -1,13 +1,103 @@ -# -# Script for creating cloud development environment -# Please do not modify this script as it will be auto-updated from the AL-Go Template -# Recommended approach is to use as is or add a script (freddyk-devenv.ps1), which calls this script with the user specific parameters -# +<# +.SYNOPSIS + Creates a cloud-based development environment for Business Central AL development using SaaS Sandbox. + +.DESCRIPTION + This script sets up a cloud-based development environment by: + - Creating a Business Central SaaS Sandbox environment + - Compiling and publishing all apps and test apps to the development scope + - Configuring launch.json for Visual Studio Code with Cloud Sandbox configuration + - Optionally applying custom settings to override repository settings + + The script will prompt you interactively for authentication using device code flow. + For automated/unattended execution, you can configure AdminCenterApiCredentials as a GitHub secret + or in Azure KeyVault. See https://aka.ms/algosettings for more information about AdminCenterApiCredentials. + + This is an alternative to localDevEnv.ps1 for users who cannot run Docker containers locally. + + RECOMMENDED USAGE: + Instead of modifying this script directly (which will be overwritten during AL-Go updates), + create a custom script that calls this one with your preferred parameters. For example, + create a file named after yourself (e.g., 'john-devenv.ps1') that contains: + + # My personal cloud development environment script + $mySettings = '{"country":"us"}' + . .\.AL-Go\cloudDevEnv.ps1 -environmentName "john-sandbox" -reuseExistingEnvironment $true -customSettings $mySettings + + This approach allows you to: + - Maintain your personal preferences without losing them during updates + - Share your setup with team members + - Version control your custom development configurations + - Easily switch between different development scenarios + +.PARAMETER environmentName + The name of the cloud sandbox environment to create or reuse. + If not specified, the script will prompt for input with a default of "{username}-sandbox". + +.PARAMETER reuseExistingEnvironment + Boolean parameter indicating whether to reuse an existing environment with the same name. + If $true, the script will use the existing environment if it exists. + If $false, the script will recreate the environment (deleting the old one if it exists). + If not specified, the script will prompt the user to select the behavior. + +.PARAMETER fromVSCode + Switch parameter indicating the script is being run from Visual Studio Code. + When specified, the script will pause at the end waiting for user input before closing. + +.PARAMETER clean + Switch parameter to create a clean development environment without compiling and publishing apps. + Useful for setting up a fresh environment without deploying any applications. + +.PARAMETER customSettings + JSON string containing custom settings that override repository settings. + These settings have the highest precedence and can be used to override country, + or other configuration without modifying repository files. + +.EXAMPLE + .\cloudDevEnv.ps1 + Runs the script interactively, prompting for all required parameters. + +.EXAMPLE + .\cloudDevEnv.ps1 -environmentName "my-sandbox" -reuseExistingEnvironment $true + Creates or reuses a cloud sandbox named "my-sandbox". + +.EXAMPLE + .\cloudDevEnv.ps1 -clean + Creates a clean cloud development environment without compiling and publishing apps. + +.EXAMPLE + .\cloudDevEnv.ps1 -customSettings '{"country":"dk"}' + Creates a cloud development environment with custom settings for Denmark country. + +.EXAMPLE + # Programmatic setup with custom settings + $envName = "test-sandbox" + $settings = '{"country": "us"}' + + . ./cloudDevEnv.ps1 -environmentName $envName -reuseExistingEnvironment $true -customSettings $settings + + Creates or reuses a cloud development environment with custom country setting. + +.NOTES + - Authentication is handled interactively via device code flow (https://aka.ms/devicelogin) + - For unattended execution, configure AdminCenterApiCredentials secret (see link below) + - Does not require Docker to be installed + - Script automatically downloads required AL-Go helper modules and actions + - Modifies launch.json in VS Code workspace for Cloud Sandbox configuration + - Custom settings parameter allows runtime override of repository settings + - If NewBcContainer.ps1 override exists, cloud development may not be supported + +.LINK + https://aka.ms/algosettings - AL-Go Settings Documentation + https://github.com/microsoft/AL-Go/blob/main/Scenarios/CreateOnlineDevEnv2.md - Online Dev Environment Setup +#> + Param( [string] $environmentName = "", [bool] $reuseExistingEnvironment, [switch] $fromVSCode, - [switch] $clean + [switch] $clean, + [string] $customSettings = "" ) $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 @@ -51,12 +141,12 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt -$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder -$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt +$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder +$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath Import-Module $ReadSettingsModule @@ -103,7 +193,8 @@ CreateDevEnv ` -reuseExistingEnvironment:$reuseExistingEnvironment ` -baseFolder $baseFolder ` -project $project ` - -clean:$clean + -clean:$clean ` + -customSettings $customSettings } catch { Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)" diff --git a/Main App/.AL-Go/localDevEnv.ps1 b/Main App/.AL-Go/localDevEnv.ps1 index 234bb23..4bd45e1 100644 --- a/Main App/.AL-Go/localDevEnv.ps1 +++ b/Main App/.AL-Go/localDevEnv.ps1 @@ -1,8 +1,106 @@ -# -# Script for creating local development environment -# Please do not modify this script as it will be auto-updated from the AL-Go Template -# Recommended approach is to use as is or add a script (freddyk-devenv.ps1), which calls this script with the user specific parameters -# +<# +.SYNOPSIS + Creates a local development environment for Business Central AL development using Docker containers. + +.DESCRIPTION + This script sets up a local development environment by: + - Creating a Business Central container using Docker + - Compiling and publishing all apps and test apps to the development scope + - Configuring launch.json for Visual Studio Code with Local Sandbox configuration + - Optionally applying custom settings to override repository settings + + The script requires Docker to be installed and configured to run Windows containers. + If Docker setup fails, users can alternatively run cloudDevEnv.ps1 for cloud-based development. + + RECOMMENDED USAGE: + Instead of modifying this script directly (which will be overwritten during AL-Go updates), + create a custom script that calls this one with your preferred parameters. For example, + create a file named after yourself (e.g., 'john-devenv.ps1') that contains: + + # My personal development environment script + $mySettings = '{"country":"us","artifact":"////nextminor"}' + . .\.AL-Go\localDevEnv.ps1 -containerName "mydevenv" -auth UserPassword -customSettings $mySettings + + This approach allows you to: + - Maintain your personal preferences without losing them during updates + - Share your setup with team members + - Version control your custom development configurations + - Easily switch between different development scenarios + +.PARAMETER containerName + The name of the Docker container to create. If not specified, the script will prompt for input. + Default prompts for "bcserver" if not provided. + +.PARAMETER auth + Authentication mechanism for the container. Valid values are "UserPassword" or "Windows". + If not specified, the script will prompt the user to select the authentication method. + +.PARAMETER credential + PSCredential object containing username and password for container authentication. + If not provided, the script will prompt for credentials based on the selected auth method. + +.PARAMETER licenseFileUrl + Local path or secure download URL to a Business Central license file. + For AppSource apps targeting BC versions prior to 22, a developer license with object ID permissions is required. + For PTEs, this is optional but can be useful for dependent app object IDs. + Set to "none" to skip license file input. + +.PARAMETER fromVSCode + Switch parameter indicating the script is being run from Visual Studio Code. + When specified, the script will pause at the end waiting for user input before closing. + +.PARAMETER accept_insiderEula + Switch parameter to automatically accept the insider EULA when using Business Central insider builds. + Required when working with insider artifacts. + +.PARAMETER clean + Switch parameter to create a clean development environment without compiling and publishing apps. + Useful for setting up a fresh container without deploying any applications. + +.PARAMETER customSettings + JSON string containing custom settings that override repository settings. + These settings have the highest precedence and can be used to override artifact URLs, + country settings, or other configuration without modifying repository files. + +.EXAMPLE + .\localDevEnv.ps1 + Runs the script interactively, prompting for all required parameters. + +.EXAMPLE + .\localDevEnv.ps1 -containerName "mydevenv" -auth "UserPassword" + Creates a container named "mydevenv" with username/password authentication, prompting for credentials and LicenseFile. + +.EXAMPLE + .\localDevEnv.ps1 -clean + Creates a clean development environment without compiling and publishing apps. + +.EXAMPLE + .\localDevEnv.ps1 -customSettings '{"country":"dk","artifact":"////nextminor"}' + Creates a development environment with custom settings for Denmark country and specific artifact. + +.EXAMPLE + # Programmatic setup with credentials and custom settings + $Username = "SUPER" + $Password = "" + $cred = New-Object System.Management.Automation.PSCredential ($Username, (ConvertTo-SecureString $Password -AsPlainText -Force)) + $containerName = "bcserver" + $settings = '{"artifact": "////nextminor"}' + + . ./localDevEnv.ps1 -containerName $containerName -auth UserPassword -credential $cred -accept_insiderEula -licenseFileUrl "none" -customSettings $settings + + Creates a development environment with predefined credentials, using next minor version artifact, accepting insider EULA, and no license file. + +.NOTES + - Requires Docker Desktop to be installed and running with Windows container support + - For AppSource apps, may require a developer license for BC versions prior to 22 + - Script automatically downloads required AL-Go helper modules and actions + - Modifies launch.json in VS Code workspace for Local Sandbox configuration + - Custom settings parameter allows runtime override of repository settings + +.LINK + https://aka.ms/algosettings - AL-Go Settings Documentation +#> + Param( [string] $containerName = "", [ValidateSet("UserPassword", "Windows")] @@ -11,7 +109,8 @@ Param( [string] $licenseFileUrl = "", [switch] $fromVSCode, [switch] $accept_insiderEula, - [switch] $clean + [switch] $clean, + [string] $customSettings = "" ) $errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0 @@ -55,12 +154,12 @@ Write-Host -ForegroundColor Yellow @' $tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())" New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null -$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt -$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder -$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder -$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/AL-Go-Helper.ps1' -folder $tmpFolder -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null -DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null +$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/Github-Helper.psm1' -folder $tmpFolder -notifyAuthenticatedAttempt +$ReadSettingsModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/ReadSettings.psm1' -folder $tmpFolder +$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/DebugLogHelper.psm1' -folder $tmpFolder +$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/AL-Go-Helper.ps1' -folder $tmpFolder +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json' -folder $tmpFolder | Out-Null +DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/Environment.Packages.proj' -folder $tmpFolder | Out-Null Import-Module $GitHubHelperPath Import-Module $ReadSettingsModule @@ -160,7 +259,8 @@ CreateDevEnv ` -credential $credential ` -licenseFileUrl $licenseFileUrl ` -accept_insiderEula:$accept_insiderEula ` - -clean:$clean + -clean:$clean ` + -customSettings $customSettings } catch { Write-Host -ForegroundColor Red "Error: $($_.Exception.Message)`nStacktrace: $($_.scriptStackTrace)" diff --git a/Main App/.AL-Go/settings.json b/Main App/.AL-Go/settings.json index 70b3a93..dae1594 100644 --- a/Main App/.AL-Go/settings.json +++ b/Main App/.AL-Go/settings.json @@ -1,5 +1,5 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/55f06533726d052e7603277236f2bcbcd67fa6cf/Actions/.Modules/settings.schema.json", + "$schema": "https://raw.githubusercontent.com/microsoft/AL-Go/924e49c5c1b8e90d2bc3177c84c5b7a5d7e36b8a/Actions/.Modules/settings.schema.json", "country": "us", "VersioningStrategy": 16, "CodeSignCertificateUrlSecretName": "CodeSignCertificateUrl",